Вот мой HTML -контент: < /p>
< /code>
Вот моя директива Tabsmenu: < /p>
angular.module('directives.tabsMenu', [])
.directive('tabsMenu', function() {
return {
// Restrict it to be an attribute in this case
restrict: 'A',
// Responsible for registering DOM listeners as well as updating the DOM
link: function(scope, element, attrs) {
element.bind('click', function(e) {
console.log('clicked');
e.preventDefault();
$(this).tab('show');
});
}
};
});
< /code>
Точка разрыва в событии Click не нажимает.$('#tabs a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
< /code>
Я хочу удалить код jQuery и использовать директиву, но она не работает. Почему это может быть?
Подробнее здесь: https://stackoverflow.com/questions/201 ... not-firing