Created
October 22, 2014 16:02
-
-
Save asicfr/4c3eb936deb28117d0a5 to your computer and use it in GitHub Desktop.
This file contains 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('myApp', []); | |
var myCtrl = function ($scope) { | |
console.log("declare myCtrl"); | |
$scope.itWasUsed = false; | |
$scope.myvalue = 'value initial'; | |
$scope.useIt = function () { | |
console.log("call real useIt function"); | |
$scope.itWasUsed = true; | |
}; | |
$scope.dontUseIt = function () { | |
console.log("call real dontUseIt function"); | |
$scope.itWasUsed = false; | |
}; | |
}; | |
myCtrl.$inject = ['$scope']; | |
// bind ctrl on module | |
angular.module('myApp').controller('MyCtrl', myCtrl); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment