Skip to content

Instantly share code, notes, and snippets.

@sashless
Created July 21, 2014 15:12
Show Gist options
  • Save sashless/2314ee14844ff2c42d47 to your computer and use it in GitHub Desktop.
Save sashless/2314ee14844ff2c42d47 to your computer and use it in GitHub Desktop.
var app = angular.module('scholarApp.controllers');
var NavCtrl = function($scope, $location) {
...
};
// A nicer explicit dependency injection syntax
NavCtrl.$inject = ['$scope', '$location'];
app.controller('NavCtrl', NavCtrl);
/**
the other way way
**/
var app = angular.module('scholarApp.controllers');
app.controller('NavCtrl', function($scope, $location) {
..
});
@sashless
Copy link
Author

yea thats nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment