AngularJS web sitesi yazıyorum ve dinamik bir templateUrl dosyasına ihtiyacım var.Çalışma zamanında oluşturulmuş bağlantılar için Dynamic templateUrl kullanma
URL şablonumu kodlarsanız, yönlendirmem çalışır.
when('/levelthree', {
templateUrl: 'views/levelthree/1.001_WhitePaper.htm',
controller: 'LevelThreeController'
}).
Bunu denediğimde, yapmaz.
Tıklandığında belge URL'sini iletirken çalışan bir dinamik templateUrl'e nasıl sahip olabilirim?
// HREF
<a id=\"a0\" style=\"color: rgb(0, 0, 0);\" href=\"#levelthree\" data-url=\"1.001_WhitePaper.htm\">White Paper <i
class=\"fa fa-play\" style=\"color: rgb(0, 128, 0);\"></i></a>
// URL of the HREF, when clicked.
http://localhost:65155/testwebsite/Index.html#levelthree
// Code that gets the document I need.
$(document).on("click", ".openLevelThree", function (e) {
var documentSelected = $(this).children('a').attr('data-url');
setStorageItem("LevelThreeDocumentSelected", documentSelected);
});
Ben this baktım ama bunun benim için işe yarayıp yaramayacağını görmek için $ kapsamına erişim olurdu nerede görmüyorum.
Güzel ... teşekkür ederim. –
Sevindim dostum :) –