Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.TestFunc = function () {
- alert("TestFunc called");
- }
- <button class="btn btn-default btn-column" print-button-spinner test="TestFunc()" >
- test
- </button>
- App.directive('printButtonSpinner', function() {
- return {
- scope:
- {
- docType: '@',
- test: '&'
- },
- restrict: 'A',
- link: function (scope, element) {
- var printFunc = scope.test();
- element.bind('click', printFunc);
- }
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement