File tree Expand file tree Collapse file tree 4 files changed +283
-243
lines changed
Expand file tree Collapse file tree 4 files changed +283
-243
lines changed Original file line number Diff line number Diff line change 117117 "babel-preset-es2015-loose-native-modules" : " 1.0.0" ,
118118 "babel-preset-stage-1" : " 6.16.0" ,
119119 "babel-register" : " 6.16.3" ,
120+ "chalk" : " ^1.1.3" ,
120121 "compression-webpack-plugin" : " 0.3.1" ,
121122 "concurrently" : " 3.1.0" ,
122123 "cross-env" : " 3.1.2" ,
123124 "favicons-webpack-plugin" : " 0.0.7" ,
125+ "fs" : " 0.0.1-security" ,
124126 "http-server" : " 0.9.0" ,
125127 "ignore-loader" : " 0.1.1" ,
126128 "intl" : " 1.2.5" ,
133135 "karma-remap-istanbul" : " 0.2.1" ,
134136 "karma-sourcemap-loader" : " 0.3.7" ,
135137 "karma-webpack" : " 1.8.0" ,
136- "rimraf" : " 2.5.4" ,
138+ "ncp" : " ^2.0.0" ,
139+ "rimraf" : " ^2.5.4" ,
137140 "typescript" : " 2.0.3" ,
138141 "wait-on" : " 1.5.3" ,
139142 "webpack" : " 2.1.0-beta.22" ,
Original file line number Diff line number Diff line change 1+ import { inject } from 'aurelia-framework' ;
12import { Router , RouterConfiguration } from 'aurelia-router' ;
3+ import { I18N } from 'aurelia-i18n' ;
24
5+ @inject ( I18N , 'AppConfig' )
36export class App {
4- public router : Router ;
7+ public router : Router ;
58
6- public configureRouter ( config : RouterConfiguration , router : Router ) : void {
7- config . title = 'Aurelia' ;
8- config . map ( [
9- {
10- route : [ '' , 'welcome' ] ,
11- name : 'welcome' ,
12- moduleId : './modules/welcome/welcome' ,
13- nav : true ,
14- title : 'Welcome'
15- } ,
16- {
17- route : 'users' ,
18- name : 'users' ,
19- moduleId : './modules/users/users' ,
20- nav : true ,
21- title : 'Github Users'
22- } ,
23- {
24- route : 'child-router' ,
25- name : 'child-router' ,
26- moduleId : './modules/child-router/child-router' ,
27- nav : true ,
28- title : 'Child Router'
29- }
30- ] ) ;
9+ constructor (
10+ private i18n : I18N ,
11+ private appConfig : AppConfig . IAppConfig
12+ ) { }
3113
32- this . router = router ;
33- }
14+ public configureRouter ( config : RouterConfiguration , router : Router ) : void {
15+ config . title = this . i18n . tr ( 'TITLE' ) ;
16+ if ( this . appConfig . PLATFORM === 'web' ) {
17+ config . options . pushState = true ;
18+ }
19+ config . map ( [
20+ {
21+ route : [ '' , 'welcome' ] ,
22+ name : 'welcome' ,
23+ moduleId : './modules/welcome/welcome' ,
24+ nav : true ,
25+ title : 'Welcome'
26+ } ,
27+ {
28+ route : 'users' ,
29+ name : 'users' ,
30+ moduleId : './modules/users/users' ,
31+ nav : true ,
32+ title : 'Github Users'
33+ } ,
34+ {
35+ route : 'child-router' ,
36+ name : 'child-router' ,
37+ moduleId : './modules/child-router/child-router' ,
38+ nav : true ,
39+ title : 'Child Router'
40+ }
41+ ] ) ;
42+
43+ this . router = router ;
44+ }
3445}
Original file line number Diff line number Diff line change 99 <meta name =" description" content =" <%= htmlWebpackPlugin.options.description %>" >
1010 <meta name =" version" content =" <%= htmlWebpackPlugin.options.version %>" >
1111 <meta name =" author" content =" <%= htmlWebpackPlugin.options.author %>" >
12+
13+ <% if (htmlWebpackPlugin .options .platform === ' mobile' ) { % >
14+ <!-- Cordova -->
15+ < script src= " cordova.js" >< / script>
16+ < % } %>
17+ <% if (htmlWebpackPlugin .options .platform === ' web' ) { % >
1218 < base href= " <%= htmlWebpackPlugin.options.baseUrl %>" >
13- <!-- imported CSS are concatenated and added automatically -- >
19+ < % } % >
1420</head >
1521
1622<body aurelia-app =" main" >
2531 < % } %>
2632</body >
2733
28- </html >
34+ </html >
You can’t perform that action at this time.
0 commit comments