Hi Abe,
You are adding stuff to your originating template/html and don’t recompile.
Hence your function is visible in the HTML, but never seen by angular.
also, you make this overly complex!
have a look at this:
angular.module('test').directive('sortable', [ function () {
return {
restrict: 'A',
scope: {
sortableCollection: '=',
sortableKey: '&'
},
Link: function (scope, element, attrs) {
scope.sortableKey = scope.sortableKey();
scope.sortFunction = function() {
alert(" I AM IN UR FUCNTION SORTING UR D00dZ!!1");
};
element.on('click', function () {
scope.$apply(scope.sortFunction)
});
});
}
}]);
Does that help?
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.