Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// The $get function is where you return an object and inject services | |
// Providers run before everything else, so the only thing you can inject into them is other providers | |
angular.module("<ModuleName>").provider("<ServiceName>", function <ServiceName>Provider(otherProvider) { | |
this.$get <factory function> | |
}); |
angular.module("<ModuleName>").factory("<ServiceName>", function <ServiceName>Factory() { | |
return { <object containing shared functions> } | |
}); |
angular.module('NoteApp', ['ngRoute']) | |
.config(['$routeProvider', function($routeProvider) { | |
$routeProvider.when('/notes', { | |
templateUrl: 'templates/pages/notes/index.html' | |
}) | |
.when('/users', { | |
templateUrl: 'templates/pages/users/index.html' | |
}) | |
.when('/notes/new', { | |
templateUrl: 'templates/pages/notes/edit.html' |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.