forked from angular/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact(*): further architectural improvements
- Loading branch information
1 parent
e5b915f
commit 0847b75
Showing
32 changed files
with
131 additions
and
236 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
{ | ||
"globalstrict": true, | ||
"globals": { | ||
"angular": false | ||
"angular": false, | ||
"describe": false, | ||
"it": false, | ||
"expect": false, | ||
"beforeEach": false, | ||
"afterEach": false, | ||
"module": false, | ||
"inject": false | ||
} | ||
} |
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
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
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.version.interpolate-filter', []) | ||
|
||
.filter('interpolate', ['version', function(version) { | ||
return function(text) { | ||
return String(text).replace(/\%VERSION\%/mg, version); | ||
}; | ||
}]); |
4 changes: 2 additions & 2 deletions
4
...components/version/version-filter_test.js → ...onents/version/interpolate-filter_test.js
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.version'). | ||
directive('appVersion', ['version', function(version) { | ||
return function(scope, elm, attrs) { | ||
elm.text(version); | ||
}; | ||
}]); | ||
angular.module('myApp.version.version-directive', []) | ||
|
||
.directive('appVersion', ['version', function(version) { | ||
return function(scope, elm, attrs) { | ||
elm.text(version); | ||
}; | ||
}]); |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.version', []). | ||
value('version', '0.1'); | ||
angular.module('myApp.version', [ | ||
'myApp.version.interpolate-filter', | ||
'myApp.version.version-directive' | ||
]) | ||
|
||
.value('version', '0.1'); |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.view1', ['ngRoute']) | ||
.config(['$routeProvider', function($routeProvider) { | ||
$routeProvider.when('/view1', { | ||
templateUrl: 'view1/view1.html', | ||
controller: 'View1Ctrl' | ||
}); | ||
}]) | ||
.controller('View1Ctrl', [function() { | ||
|
||
}]); | ||
|
||
.config(['$routeProvider', function($routeProvider) { | ||
$routeProvider.when('/view1', { | ||
templateUrl: 'view1/view1.html', | ||
controller: 'View1Ctrl' | ||
}); | ||
}]) | ||
|
||
.controller('View1Ctrl', [function() { | ||
|
||
}]); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
'use strict'; | ||
|
||
describe('view1 controller', function(){ | ||
describe('myApp.view1 module', function() { | ||
|
||
beforeEach(module('myApp.view1')); | ||
|
||
it('should ....', inject(function($controller) { | ||
//spec body | ||
var view1Ctrl = $controller('View1Ctrl'); | ||
expect(view1Ctrl).toBeDefined(); | ||
})); | ||
describe('view1 controller', function(){ | ||
|
||
it('should ....', inject(function($controller) { | ||
//spec body | ||
var view1Ctrl = $controller('View1Ctrl'); | ||
expect(view1Ctrl).toBeDefined(); | ||
})); | ||
|
||
}); | ||
}); | ||
}); |
Oops, something went wrong.