Skip to content

Instantly share code, notes, and snippets.

@tonyjoanes
Last active October 18, 2019 13:56
Show Gist options
  • Save tonyjoanes/f13672ecfed0c94aad380e6acd2ae976 to your computer and use it in GitHub Desktop.
Save tonyjoanes/f13672ecfed0c94aad380e6acd2ae976 to your computer and use it in GitHub Desktop.
(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