app.directive('mansory',function(){
return {
controller:function($scope){
this.changed = function(){
$scope.changed();
}
},
link: function(scope,element,attr){
scope.changed = function(){
console.log('我已改变');
};
}
};
}]);
app.directive('mansoryRepeatFinish',function(){
return {
require:'^mansory',
link: function(scope,element,attr,mansoryCtrl){
if(scope.$last == true){
mansoryCtrl.changed();
}
}
};
});
浙公网安备 33010602011771号