This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree 13 files changed +32
-24
lines changed
13 files changed +32
-24
lines changed Original file line number Diff line number Diff line change 46
46
47
47
//- NgModule related
48
48
- var _AppModuleVsAppComp = ' AppModule'
49
- - var _appModuleTsVsAppCompTs = ' app/app.module.ts'
50
- - var _appModuleTsVsMainTs = ' app/app.module.ts'
49
+ - var _appModuleTsVsAppCompTs = ' src/ app/app.module.ts'
50
+ - var _appModuleTsVsMainTs = ' src/ app/app.module.ts'
51
51
- var _bootstrapModule = ' bootstrapModule'
52
52
- var _declsVsDirectives = ' declarations'
53
53
- var _moduleVsComp = ' module'
Original file line number Diff line number Diff line change
1
+ {
2
+ "server" : {
3
+ "baseDir" : " src" ,
4
+ "routes" : {
5
+ "/node_modules" : " node_modules"
6
+ }
7
+ }
8
+ }
Original file line number Diff line number Diff line change @@ -420,11 +420,11 @@ a#toh
420
420
Here they are for comparison:
421
421
422
422
+ makeTabs(
423
- ` toh-6/ts/src /index.html,
424
- toh-6/ts/src/index-jit .html` ,
423
+ ` toh-6/ts/aot /index.html,
424
+ toh-6/ts/src/index.html` ,
425
425
null ,
426
- ` src /index.html (AOT),
427
- src/index-jit .html (JIT)`
426
+ ` aot /index.html (AOT),
427
+ src/index.html (JIT)`
428
428
)
429
429
430
430
:marked
Original file line number Diff line number Diff line change @@ -461,8 +461,8 @@ a#text-plugin
461
461
You'll need it to import the language translation file.
462
462
463
463
SystemJS doesn't ship with a raw text plugin but it's easy to add.
464
- Create the following `systemjs-text-plugin.js` in the root folder:
465
- + makeExample('cb-i18n/ts/systemjs-text-plugin.js' , null , 'systemjs-text-plugin.js' )( format ='.' )
464
+ Create the following `systemjs-text-plugin.js` in the `src/` folder:
465
+ + makeExample('cb-i18n/ts/src/ systemjs-text-plugin.js' , null , 'src/ systemjs-text-plugin.js' )( format ='.' )
466
466
:marked
467
467
### Create translation providers
468
468
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ a#node-modules
104
104
loads `systemjs.config.server.js`.
105
105
+ makeExample('deployment/ts/src/index.html' , 'systemjs-config' , '' )( format ="." )
106
106
:marked
107
- (3) Add `systemjs.config.server.js` (shown in the code sample below) to the root folder.
107
+ (3) Add `systemjs.config.server.js` (shown in the code sample below) to the `src/` folder.
108
108
This alternative version configures _SystemJS_ to load _UMD_ versions of Angular
109
109
(and other third-party packages) from the web.
110
110
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ figure.image-display
77
77
The CSS `selector` in the `@Component` !{_decorator} specifies an element named `<my-app>`.
78
78
That element is a placeholder in the body of your `index.html` file:
79
79
80
- + makeExcerpt('index.html' , 'body' )
80
+ + makeExcerpt('src/ index.html' , 'body' )
81
81
82
82
:marked
83
83
When you bootstrap with the `AppComponent` class (in <ngio-ex path="main.ts"></ngio-ex>), Angular looks for a `<my-app>`
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ figure.image-display
236
236
:marked
237
237
Let's add the stylesheet. Open `index.html` and add the following link to the `<head>`:
238
238
239
- + makeExcerpt('index.html' , 'bootstrap' )
239
+ + makeExcerpt('src/ index.html' , 'bootstrap' )
240
240
241
241
.l-main-section
242
242
:marked
@@ -427,12 +427,12 @@ figure.image-display
427
427
We achieve this effect by adding these class definitions to a new `forms.css` file
428
428
that we add to our project as a sibling to `index.html`:
429
429
430
- + makeExample('forms.css' )
430
+ + makeExample('src/ forms.css' )
431
431
432
432
:marked
433
433
Update the `<head>` of `index.html` to include this style sheet:
434
434
435
- + makeExcerpt('index.html' , 'styles' )
435
+ + makeExcerpt('src/ index.html' , 'styles' )
436
436
437
437
:marked
438
438
## Show and hide validation error messages
@@ -685,7 +685,7 @@ figure.image-display
685
685
forms/ts/src/app/app.component.ts,
686
686
forms/ts/src/main.ts,
687
687
forms/ts/src/index.html,
688
- forms/ts/forms.css` ,
688
+ forms/ts/src/ forms.css` ,
689
689
'final, final,,,,,' ,
690
690
` hero-form.component.ts,
691
691
hero-form.component.html,
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ include ../../../_includes/_see-addr-bar
83
83
If the `app` folder is the application root, as it is for the sample application,
84
84
set the `href` value *exactly* as shown here.
85
85
86
- + makeExcerpt('index.html' , 'base-href' )
86
+ + makeExcerpt('src/ index.html' , 'base-href' )
87
87
88
88
:marked
89
89
### Router imports
@@ -389,7 +389,7 @@ a#base-href
389
389
If the `app` folder is the application root, as it is for this application,
390
390
set the `href` value in **`index.html`** *exactly* as shown here.
391
391
392
- + makeExcerpt('index.html' , 'base-href' )
392
+ + makeExcerpt('src/ index.html' , 'base-href' )
393
393
394
394
.callout.is-important
395
395
header Live example note
@@ -2770,7 +2770,7 @@ code-example(format="nocode").
2770
2770
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base" target="_blank" title="base href"><base href> element</a>
2771
2771
tag in the `<head>` of the `index.html`.
2772
2772
2773
- + makeExcerpt('index.html' , 'base-href' , '' )
2773
+ + makeExcerpt('src/ index.html' , 'base-href' , '' )
2774
2774
2775
2775
:marked
2776
2776
Without that tag, the browser may not be able to load resources
Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ a#in-mem-web-api
665
665
## Appendix: Tour of Heroes _in-memory web api_
666
666
667
667
If the app only needed to retrieve data, you could get the heroes from a `heroes.json` file:
668
- - var _heroesJsonPath = (_docsFor == ' dart' ? ' web' : ' app' ) + ' /heroes.json' ;
668
+ - var _heroesJsonPath = (_docsFor == ' dart' ? ' web' : ' src/ app' ) + ' /heroes.json' ;
669
669
+ makeJson('server-communication/' + _docsFor + '/' + _heroesJsonPath, null , _heroesJsonPath)( format ="." )
670
670
.l-sub-section
671
671
:marked
Original file line number Diff line number Diff line change @@ -1239,7 +1239,7 @@ a(href="#toc") Back to top
1239
1239
1240
1240
.s-rule.do
1241
1241
:marked
1242
- **Do** create an Angular module in the app's root folder (e.g., in `/app`).
1242
+ **Do** create an Angular module in the app's root folder (e.g., in `/src/ app`).
1243
1243
1244
1244
.s-why
1245
1245
:marked
Original file line number Diff line number Diff line change @@ -1107,7 +1107,7 @@ code-example(format="").
1107
1107
This file has been configured as the application entrypoint in `systemjs.config.js`,
1108
1108
so it is already being loaded by the browser.
1109
1109
1110
- + makeExample('upgrade-phonecat-2-hybrid/ts/main.ts' , 'bootstrap' )
1110
+ + makeExample('upgrade-phonecat-2-hybrid/ts/app/ main.ts' , 'bootstrap' )
1111
1111
1112
1112
:marked
1113
1113
The arguments used here are the root element of the application (which is
@@ -1459,7 +1459,7 @@ code-example(format="").
1459
1459
Now we can drop `upgrade.bootstrap` from our application bootstrap, and remove the
1460
1460
`ngDoBootstrap()` override from `app.module.ts`
1461
1461
1462
- + makeExample('upgrade-phonecat-3-final/ts/main.ts' , null , 'main.ts' )
1462
+ + makeExample('upgrade-phonecat-3-final/ts/app/ main.ts' , null , 'main.ts' )
1463
1463
+ makeExample('upgrade-phonecat-3-final/ts/app/app.module.ts' , null , 'app.module.ts' )
1464
1464
1465
1465
:marked
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ code-example(language="sh" class="code-shell").
156
156
157
157
+ makeTabs(
158
158
` webpack/ts/package.webpack.json,
159
- webpack/ts/src/ tsconfig.1.json,
159
+ webpack/ts/tsconfig.1.json,
160
160
webpack/ts/webpack.config.js,
161
161
webpack/ts/karma.webpack.conf.js,
162
162
webpack/ts/config/helpers.js` ,
Original file line number Diff line number Diff line change @@ -879,7 +879,7 @@ block style-urls
879
879
These correspond to the full set of master styles that we installed earlier during [setup](../guide/setup.html).
880
880
Here is an excerpt:
881
881
882
- + makeExcerpt('styles.css (excerpt)' , 'toh' )
882
+ + makeExcerpt('src/ styles.css (excerpt)' , 'toh' )
883
883
884
884
- var styles_css = ' https://raw.githubusercontent.com/angular/angular.io/master/public/docs/_examples/_boilerplate/styles.css'
885
885
@@ -889,7 +889,7 @@ block style-urls
889
889
890
890
If necessary, also edit <span ngio-ex>index.html</span> to refer to this stylesheet.
891
891
892
- + makeExcerpt('index.html (link ref)' , 'css' )
892
+ + makeExcerpt('src/ index.html (link ref)' , 'css' )
893
893
894
894
:marked
895
895
Look at the app now. Our dashboard, heroes, and navigation links are styling!
You can’t perform that action at this time.
0 commit comments