can i rewrite doing scope.method()(params)?
| /* directive */ | |
| function modalOverlay ($sce, $parse, uuid) { | |
| return { | |
| restrict: 'E', | |
| transclude: true, | |
| scope: { | |
| data: '=', | |
| onComplete: '&' | |
| }, | |
| templateUrl: 'views/directives/modal_overlay.html', | |
| link: function (scope, element, attrs) { | |
| ... | |
| scope.onSuccess = function(response){ | |
| scope.onComplete()(response.data) // can I rewrite this onComplete()() thing? | |
| } | |
| ... | |
| } | |
| } | |
| } | |
| angular | |
| .module('adminPanelAngularApp') | |
| .directive('modalOverlay', modalOverlay); |
| <modal-overlay data="modalData" on-complete="modalComplete"></modal-overlay> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment