Created
June 18, 2013 19:45
-
-
Save hunterloftis/5808628 to your computer and use it in GitHub Desktop.
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
<html ng-app='testApp'> | |
<body ng-controller='testController'> | |
<button ng-click='test()'>Menu</button> | |
<my-custom-directive id='needToAccess'></my-custom-directive> | |
</body> | |
<script> | |
angular | |
.module('testApp', []) | |
.controller('testController', function($scope) { | |
$scope.test = function() { | |
// myCustomDirective has an "open" method on its scope. | |
// I can put this method on its controller if that would be better. | |
// In any case, I need to trigger this method inside of test() but I don't know how. Something like this? | |
(some way of identifying #needToAccess).open(); | |
}; | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment