Created
May 26, 2017 16:12
-
-
Save ericmustin/2a3b06ca153e7d8339595ec066695770 to your computer and use it in GitHub Desktop.
example for abstracting some of controller DOM manipulation into directive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # $scope.goBackToMainMenu = (event) -> | |
| # console.log('goBackToMainMenu invoked with, ', event) | |
| # return true if $(event.target).is("li.link.strong") | |
| # $scope.sub_menu_show = false | |
| # $timeout( -> | |
| # $scope.sub_menu = false | |
| # , 200) | |
| # true | |
| $scope.$on('gobacktomainmenu', (_event, args) -> | |
| $scope.sub_menu = sub_menu = args['sub_menu'] | |
| $scope.sub_menu_show = sub_menu = args['sub_menu'] | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment