Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 188f062

Browse files
author
Nick Litwin
committed
Rename files and update module name
1 parent e1d6c29 commit 188f062

13 files changed

+47
-57
lines changed

app/account/account.module.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(function() {
2+
'use strict';
3+
4+
var dependencies = [
5+
'ui.router'
6+
];
7+
8+
angular.module('tc.account', dependencies);
9+
10+
})();

app/app.routes.js renamed to app/account/account.routes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(function() {
22
'use strict';
33

4-
angular.module('topcoder-account').config(routes);
4+
angular.module('tc.account').config(routes);
55

66
routes.$inject = ['$locationProvider', '$stateProvider', '$urlRouterProvider'];
77

@@ -11,11 +11,11 @@
1111
$stateProvider
1212
.state('login', {
1313
url: '/login',
14-
templateUrl: 'login/login.html'
14+
templateUrl: 'account/login/login.html'
1515
})
1616
.state('register', {
1717
url: '/register',
18-
templateUrl: 'register/register.html'
18+
templateUrl: 'account/register/register.html'
1919
});
2020

2121
$urlRouterProvider.otherwise('/login');

app/account/login/login.controller.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(function() {
2+
'use strict';
3+
4+
angular.module('tc.account').controller('LoginController', LoginController);
5+
6+
LoginController.$inject = [];
7+
8+
function LoginController() {
9+
var vm = this;
10+
vm.name = 'login';
11+
}
12+
})();

app/account/login/login.jade

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h1(ng-controller="LoginController as vm") This is the {{vm.name}} page content
2+
3+
a(ui-sref="register") Link to Register

app/login/login.spec.js renamed to app/account/login/login.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ describe('Login Controller', function() {
33
var controller;
44

55
beforeEach(function() {
6-
bard.appModule('topcoder-account');
6+
bard.appModule('tc.account');
77
bard.inject('$controller', '$rootScope');
88
});
99

1010
beforeEach(function() {
11-
controller = $controller('Login');
11+
controller = $controller('LoginController');
1212
$rootScope.$apply();
1313
});
1414

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(function() {
2+
'use strict';
3+
4+
angular.module('tc.account').controller('RegisterController', RegisterController);
5+
6+
RegisterController.$inject = [];
7+
8+
function RegisterController() {
9+
var vm = this;
10+
vm.name = 'register';
11+
}
12+
})();

app/account/register/register.jade

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h1(ng-controller="RegisterController as vm") This is the {{vm.name}} page content
2+
3+
a(ui-sref="login") Link to Login

app/register/register.spec.js renamed to app/account/register/register.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ describe('Register Controller', function() {
33
var controller;
44

55
beforeEach(function() {
6-
bard.appModule('topcoder-account');
6+
bard.appModule('tc.account');
77
bard.inject('$controller', '$rootScope');
88
});
99

1010
beforeEach(function() {
11-
controller = $controller('Register');
11+
controller = $controller('RegisterController');
1212
$rootScope.$apply();
1313
});
1414

app/app.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

app/login/login.jade

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/login/login.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/register/register.jade

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/register/register.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)