time to simplify · Mosesgithub/starter-node-angular@3fe7f8f · GitHub
Skip to content

Commit 3fe7f8f

Browse files
author
Chris Sevilleja
committed
time to simplify
1 parent 77a6666 commit 3fe7f8f

14 files changed

Lines changed: 51 additions & 8 deletions

File tree

public/index.html

Lines changed: 4 additions & 1 deletion

public/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/appRoutes.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ angular.module('appRoutes', []).config(['$routeProvider', '$locationProvider', f
44

55
// home page
66
.when('/', {
7-
templateUrl: 'views/home.html'
7+
templateUrl: 'views/home.html',
8+
controller: 'MainController'
9+
})
10+
11+
.when('/nerds', {
12+
templateUrl: 'views/nerd.html',
13+
controller: 'NerdController'
14+
})
15+
16+
.when('/geeks', {
17+
templateUrl: 'views/geek.html',
18+
controller: 'GeekController'
819
});
920

1021
$locationProvider.html5Mode(true);

public/js/controllers/GeekCtrl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
angular.module('GeekCtrl', []).controller('GeekController', function($scope) {
2+
3+
$scope.tagline = 'The square root of life is pi!';
4+
5+
});

public/js/controllers/MainCtrl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
angular.module('MainCtrl', []).controller('MainController', function($scope) {
2+
3+
$scope.tagline = 'To the moon and back!';
4+
5+
});

public/js/controllers/NerdCtrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
angular.module('NerdCtrl', []).controller('NerdController', function($scope) {
22

3-
$scope.test = 'hello';
3+
$scope.tagline = 'Nothing beats a pocket protector!';
44

55
});

public/js/services/GeekService.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
angular.module('GeekService', []).factory('Geek', ['$http', function($http) {
2+
3+
4+
5+
}]);

public/js/services/NerdService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
angular.module('NerdService', []).factory('Nerd', ['$resource', function($resource) {
2-
1+
angular.module('NerdService', []).factory('Nerd', ['$http', function($http) {
32

3+
44

55
}]);

public/views/geek.html

Lines changed: 5 additions & 0 deletions

0 commit comments

Comments
 (0)