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(*): refactor app layout to conform to best practices
- Loading branch information
1 parent
0edde11
commit 9d0b43b
Showing
23 changed files
with
78 additions
and
83 deletions.
There are no files selected for viewing
File renamed without changes.
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,12 @@ | ||
'use strict'; | ||
|
||
// Declare app level module which depends on views, and components | ||
angular.module('myApp', [ | ||
'ngRoute', | ||
'myApp.view1', | ||
'myApp.view2', | ||
'myApp.version' | ||
]). | ||
config(['$routeProvider', function($routeProvider) { | ||
$routeProvider.otherwise({redirectTo: '/view1'}); | ||
}]); |
5 changes: 1 addition & 4 deletions
5
app/js/directives.js → app/components/version/version-directive.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
6 changes: 2 additions & 4 deletions
6
test/unit/directivesSpec.js → ...ponents/version/version-directive_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
8 changes: 2 additions & 6 deletions
8
test/unit/filtersSpec.js → ...components/version/version-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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.version', []). | ||
value('version', '0.1'); |
7 changes: 2 additions & 5 deletions
7
test/unit/servicesSpec.js → app/components/version/version_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
Empty file.
Empty file.
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.
Empty file.
File renamed without changes.
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,12 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.view1', ['ngRoute']) | ||
.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
describe('view1 controller', function(){ | ||
beforeEach(module('myApp.view1')); | ||
|
||
it('should ....', inject(function($controller) { | ||
//spec body | ||
var view1Ctrl = $controller('View1Ctrl'); | ||
expect(view1Ctrl).toBeDefined(); | ||
})); | ||
|
||
}); |
File renamed without changes.
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,12 @@ | ||
'use strict'; | ||
|
||
angular.module('myApp.view2', ['ngRoute']) | ||
.config(['$routeProvider', function($routeProvider) { | ||
$routeProvider.when('/view2', { | ||
templateUrl: 'view2/view2.html', | ||
controller: 'View2Ctrl' | ||
}); | ||
}]) | ||
.controller('View2Ctrl', [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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
describe('controllers', function(){ | ||
beforeEach(module('myApp.view2')); | ||
|
||
it('should ....', inject(function($controller) { | ||
//spec body | ||
var view2Ctrl = $controller('View2Ctrl'); | ||
expect(view2Ctrl).toBeDefined(); | ||
})); | ||
}); |
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.