Skip to content
This repository was archived by the owner on Nov 24, 2019. It is now read-only.

Commit e7d319e

Browse files
author
Adam L
committed
Added original js for reference incase you don't want to use CoffeeScript
1 parent da74fa4 commit e7d319e

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

app/js/_originals/app.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
4+
// Declare app level module which depends on filters, and services
5+
angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives']).
6+
config(['$routeProvider', function($routeProvider) {
7+
$routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: MyCtrl1});
8+
$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: MyCtrl2});
9+
$routeProvider.otherwise({redirectTo: '/view1'});
10+
}]);

app/js/_originals/controllers.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
/* Controllers */
4+
5+
6+
function MyCtrl1() {}
7+
MyCtrl1.$inject = [];
8+
9+
10+
function MyCtrl2() {
11+
}
12+
MyCtrl2.$inject = [];

app/js/_originals/directives.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict';
2+
3+
/* Directives */
4+
5+
6+
angular.module('myApp.directives', []).
7+
directive('appVersion', ['version', function(version) {
8+
return function(scope, elm, attrs) {
9+
elm.text(version);
10+
};
11+
}]);

app/js/_originals/filters.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
/* Filters */
4+
5+
angular.module('myApp.filters', []).
6+
filter('interpolate', ['version', function(version) {
7+
return function(text) {
8+
return String(text).replace(/\%VERSION\%/mg, version);
9+
}
10+
}]);

app/js/_originals/services.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/* Services */
4+
5+
6+
// Demonstrate how to register services
7+
// In this case it is a simple value service.
8+
angular.module('myApp.services', []).
9+
value('version', '0.1');

0 commit comments

Comments
 (0)