uss oop for nav check

This commit is contained in:
Rafael Schouten
2014-10-22 14:51:17 +11:00
parent 89ce4ba632
commit 175e430a2b
2 changed files with 39 additions and 30 deletions

View File

@@ -3,7 +3,7 @@ angular.module("admin.utils").directive "navCheck", (NavigationCheck)->
scope:
navCallback: '&'
link: (scope,element,attributes) ->
# Define navigationCallback on a controller in $scope, otherwise this default will be used:
# Define navigationCallback on a controller in scope, otherwise this default will be used:
scope.navCallback ||= ->
"You will lose any unsaved work!"
NavigationCheck.register(scope.navCallback)