angular.module('app', [])
.controller('aCtrl', function() {
this.count = 0;
})
<ul ng-controller='aCtrl as ctrl' >
<li data-ng-repeat="item in [23,4,5,6,7] | filter:search">
<span ng-init='ctrl.count = ctrl.count + 1'>{{item.name}}</span>
</li>
</ul>
$("ul#navigation-list a").one("click", function (e) {
$(this).addClass('active');
$(this).siblings().removeClass('active');
$.ajax({
type: "POST",
url: "ajax/"+$(this).attr('content')+".html",
success: function(html){ ... }
});
});
app.directive("name", function () {
controller : function ($scope) {
var self = this;
$scope.toThis = function (name , data ) {
self[name] = data
}
},
link:function(scope,elem,attr,contr){
scope.toThis("slide", elem)
}
}
app.directive("name2", function () {
require : "name",
controller : function () {
//this
},
link:function(scope,elem,attr,contr){
contr.slide
}
}