Skip to content

Commit 989206e

Browse files
committed
Refactor about module
1 parent 12e738f commit 989206e

8 files changed

Lines changed: 39 additions & 60 deletions

File tree

client/app/about/app.about.js

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

client/app/about/controllers/about.config.js

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

client/app/about/controllers/about.controller.js

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

client/app/about/controllers/about.routes.js

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

src/client/app/about/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict'
2+
3+
import angular from 'angular'
4+
5+
import './routes'
6+
7+
const NAME = 'com.module.about'
8+
const MODULES = [
9+
`${NAME}.routes`,
10+
]
11+
12+
angular.module(NAME, MODULES)
13+
.run(($rootScope, gettextCatalog) => $rootScope
14+
.addDashboardBox(gettextCatalog.getString('About'), 'bg-maroon', 'fa-info', 0, 'app.about.index')
15+
)
16+

src/client/app/about/routes.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict'
2+
3+
import angular from 'angular'
4+
import templateUrlMain from './views/main.html'
5+
import templateUrlAbout from './views/about.html'
6+
7+
const app = angular.module('com.module.about.routes', [])
8+
9+
app.config(($stateProvider) => $stateProvider
10+
.state('app.about', {
11+
abstract: true,
12+
url: '/about',
13+
templateUrl: templateUrlMain,
14+
})
15+
.state('app.about.index', {
16+
url: '',
17+
templateUrl: templateUrlAbout,
18+
controller: function indexCtrl ($scope) {
19+
$scope.angular = angular
20+
},
21+
})
22+
)
23+

0 commit comments

Comments
 (0)