-
-
Save RyanABailey/1e692377e1a75d498e94 to your computer and use it in GitHub Desktop.
angularJs run code after page load
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
| <div id="myDiv" ng-controller="MyCtrl"> | |
| </div> |
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
| var MyCtrl = [ | |
| '$scope', '$timeout', | |
| function ($scope, $timeout) { | |
| $timeout(function () { | |
| // code here | |
| }, 0); | |
| } | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment