Created
August 21, 2014 10:13
-
-
Save rosterloh/e86a131e12c10a5deafe to your computer and use it in GitHub Desktop.
Minimal Angular Module Syntax as per http://toddmotto.com/minimal-angular-module-syntax-approach-using-an-iife/
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'; | |
/** | |
* @class MainCtrl | |
* @classdesc Main Controller for doing awesome things | |
* @ngInject | |
*/ | |
function MainCtrl ($scope, SomeFactory) { | |
this.doSometing = function () { | |
SomeFactory.doSomething(); | |
}; | |
} | |
MainCtrl.$inject = ['$scope', 'SomeFactory']; | |
angular | |
.module('app') | |
.controller('MainCtrl', MainCtrl); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment