Last active
October 18, 2019 13:56
-
-
Save tonyjoanes/f13672ecfed0c94aad380e6acd2ae976 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 () { | |
'use strict'; | |
// Define the dependencies within an array and have a | |
// separate clean function for the controller code | |
angular | |
.module('app') | |
.controller('MyController'[ | |
'dependecyOne', | |
'dependecyTwo', | |
MyController | |
]); | |
function MyController( | |
dependecyOne, | |
dependecyTwo) { | |
var vm = this; | |
vm.data = { | |
greetingMessage : 'Hello I am some data from the controller', | |
clickHandler : dependecyOne.click | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment