Skip to content

Commit 04dbcbc

Browse files
committed
Merge pull request johnpapa#7 from johnpapa/feature/tsmodules
initial commit - WIP
2 parents abacbaf + 8e0033c commit 04dbcbc

File tree

79 files changed

+1089
-1251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1089
-1251
lines changed

src/client/app/admin/admin.controller.js

Lines changed: 14 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/app/admin/admin.controller.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
module app.admin {
2-
'use strict';
1+
import { Logger } from '../blocks/logger/logger';
32

4-
interface IAdminVm {
5-
title: string;
6-
}
7-
export class AdminController implements IAdminVm {
8-
title: string = 'Admin';
3+
'use strict';
94

10-
static $inject: Array<string> = ['logger'];
11-
constructor(private logger: blocks.logger.Logger) {
12-
this.logger.info('Activated Admin View');
13-
}
14-
}
5+
interface IAdminVm {
6+
title: string;
7+
}
8+
export class AdminController implements IAdminVm {
9+
title: string = 'Admin';
1510

16-
angular
17-
.module('app.admin')
18-
.controller('AdminController', AdminController);
11+
static $inject: Array<string> = ['logger'];
12+
constructor(private logger: Logger) {
13+
this.logger.info('Activated Admin View');
14+
}
1915
}
16+
17+
angular
18+
.module('app.admin')
19+
.controller('AdminController', AdminController);

src/client/app/admin/admin.module.js

Lines changed: 5 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/app/admin/admin.module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
module app.admin {
2-
'use strict';
1+
'use strict';
32

4-
angular.module('app.admin', [
5-
'app.core',
6-
'app.widgets'
7-
]);
8-
}
3+
angular.module('app.admin', [
4+
'app.core',
5+
'app.widgets'
6+
]);

src/client/app/admin/admin.route.js

Lines changed: 31 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/app/admin/admin.route.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
1-
module app.admin {
2-
'use strict';
1+
'use strict';
32

4-
angular
5-
.module('app.admin')
6-
.config(configureStates);
73

8-
configureStates.$inject = ['$stateProvider'];
9-
/* @ngInject */
10-
function configureStates($stateProvider: ng.ui.IStateProvider) {
11-
var states: any[] = getStates();
12-
states.forEach(function (state) {
13-
$stateProvider.state(state.state, state.config);
4+
class AdminRoute {
5+
static $inject: Array<string> = ['stateProvider'];
6+
constructor($stateProvider: ng.ui.IStateProvider) {
7+
this.configureStates()
8+
}
9+
configureStates() {
10+
// var states: any[] = this.states;
11+
this.states.forEach(function(state) {
12+
this.$stateProvider.state(state.state, state.config);
1413
});
1514
}
1615

17-
function getStates(): any[] {
18-
return [
19-
{
20-
state: 'admin',
21-
config: {
22-
url: '/admin',
23-
templateUrl: 'app/admin/admin.html',
24-
controller: 'AdminController',
25-
controllerAs: 'vm',
26-
title: 'Admin',
27-
settings: {
28-
nav: 2,
29-
content: '<i class="fa fa-lock"></i> Admin'
30-
}
16+
states: any[] = [
17+
{
18+
state: 'admin',
19+
config: {
20+
url: '/admin',
21+
templateUrl: 'app/admin/admin.html',
22+
controller: 'AdminController',
23+
controllerAs: 'vm',
24+
title: 'Admin',
25+
settings: {
26+
nav: 2,
27+
content: '<i class="fa fa-lock"></i> Admin'
3128
}
3229
}
33-
];
34-
}
30+
}
31+
];
3532
}
33+
34+
angular
35+
.module('app.admin')
36+
.config(AdminRoute);

src/client/app/app.module.js

Lines changed: 8 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)