Created
April 11, 2014 07:37
-
-
Save CallumVass/10447200 to your computer and use it in GitHub Desktop.
Yeoman Angular Generator
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
app.js: | |
'use strict'; | |
angular.module('yeomanTestApp', [ | |
'ngCookies', | |
'ngResource', | |
'ngSanitize', | |
'ngRoute' | |
]) | |
.config(function ($routeProvider) { | |
$routeProvider | |
.when('/', { | |
templateUrl: 'views/main.html', | |
controller: 'MainCtrl' | |
}) | |
.otherwise({ | |
redirectTo: '/' | |
}); | |
}); | |
main.js: | |
'use strict'; | |
angular.module('yeomanTestApp') | |
.controller('MainCtrl', function ($scope) { | |
$scope.awesomeThings = [ | |
'HTML5 Boilerplate', | |
'AngularJS', | |
'Karma' | |
]; | |
}); | |
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
app.js: | |
(function () { | |
'use strict'; | |
angular.module('yeomanTestApp', [ | |
'ngCookies', | |
'ngResource', | |
'ngSanitize', | |
'ngRoute' | |
]) | |
.config(['$routeProvider', function ($routeProvider) { | |
$routeProvider | |
.when('/', { | |
templateUrl: 'views/main.html', | |
controller: 'MainCtrl' | |
}) | |
.otherwise({ | |
redirectTo: '/' | |
}); | |
}]); | |
})(); | |
main.js: | |
(function () { | |
'use strict'; | |
angular.module('yeomanTestApp') | |
.controller('MainCtrl', ['$scope', function ($scope) { | |
$scope.awesomeThings = [ | |
'HTML5 Boilerplate', | |
'AngularJS', | |
'Karma' | |
]; | |
}]); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment