Created
December 16, 2016 23:10
-
-
Save javaeeeee/d26d4bb8236c91c24a643fd0dda8dc34 to your computer and use it in GitHub Desktop.
Using IIFE to remove AngularJS variables and methods from the global scope
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
| (function () { | |
| angular.module('app', []) | |
| .controller('HelloController', HelloController); | |
| HelloController.$inject = ['$scope']; | |
| function HelloController($scope) { | |
| $scope.myModel = 'World'; | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment