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

Commit d311025

Browse files
committed
broadly replace main.ts
1 parent 3324b95 commit d311025

16 files changed

+37
-37
lines changed

public/docs/ts/latest/cookbook/ajs-quick-reference.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ table(width="100%")
129129
td
130130
:marked
131131
### Bootstrapping
132-
+makeExample('cb-ajs-quick-reference/ts/src/app/main.ts','','main.ts')(format="." )
132+
+makeExample('cb-ajs-quick-reference/ts/src/main.ts','','main.ts')(format="." )
133133
<br>
134134
+makeExample('cb-ajs-quick-reference/ts/src/app/app.module.1.ts','','app.module.ts')(format="." )
135135

public/docs/ts/latest/cookbook/aot-compiler.jade

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ a#bootstrap
199199
Here is AOT bootstrap in `main.ts` next to the original JIT version:
200200

201201
+makeTabs(
202-
`cb-aot-compiler/ts/src/app/main.ts,
203-
cb-aot-compiler/ts/src/app/main-jit.ts`,
202+
`cb-aot-compiler/ts/src/main.ts,
203+
cb-aot-compiler/ts/src/main-jit.ts`,
204204
null,
205-
`src/app/main.ts,
206-
src/app/main-jit.ts`
205+
`src/main.ts,
206+
src/main-jit.ts`
207207
)
208208

209209
:marked
@@ -333,14 +333,14 @@ a#source-code
333333
+makeTabs(
334334
`cb-aot-compiler/ts/src/app/app.component.html,
335335
cb-aot-compiler/ts/src/app/app.component.ts,
336-
cb-aot-compiler/ts/src/app/main.ts,
336+
cb-aot-compiler/ts/src/main.ts,
337337
cb-aot-compiler/ts/index.html,
338338
cb-aot-compiler/ts/tsconfig-aot.json,
339339
cb-aot-compiler/ts/rollup-config.js`,
340340
null,
341-
`src/app/app.component.html,
342-
src/app/app.component.ts,
343-
src/app/main.ts,
341+
`app/app.component.html,
342+
app/app.component.ts,
343+
main.ts,
344344
index.html,
345345
tsconfig-aot.json,
346346
rollup-config.js`
@@ -442,10 +442,10 @@ a#toh
442442

443443
+makeTabs(
444444
`toh-6/ts/src/app/main-aot.ts,
445-
toh-6/ts/src/app/main.ts`,
445+
toh-6/ts/src/main.ts`,
446446
null,
447-
`src/app/main-aot.ts (AOT),
448-
src/app/main.ts (JIT)`
447+
`main-aot.ts (AOT),
448+
main.ts (JIT)`
449449
)
450450

451451
:marked

public/docs/ts/latest/cookbook/dynamic-form.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ include ../_util-fns
4848

4949
+makeTabs(
5050
`cb-dynamic-form/ts/src/app/app.module.ts,
51-
cb-dynamic-form/ts/src/app/main.ts`,
51+
cb-dynamic-form/ts/src/main.ts`,
5252
null,
5353
`app.module.ts,
5454
main.ts`

public/docs/ts/latest/cookbook/i18n.jade

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,13 @@ a#translate-plural-select
400400
cb-i18n/ts/src/app/app.component.html,
401401
cb-i18n/ts/src/app/app.component.ts,
402402
cb-i18n/ts/src/app/app.module.ts,
403-
cb-i18n/ts/src/app/main.1.ts,
403+
cb-i18n/ts/src/main.1.ts,
404404
cb-i18n/ts/src/locale/messages.es.xlf.html
405405
`, '', `
406406
src/app/app.component.html,
407407
src/app/app.component.ts,
408408
src/app/app.module.ts,
409-
src/app/main.ts,
409+
src/main.ts,
410410
src/locale/messages.es.xlf
411411
`)
412412

@@ -501,8 +501,8 @@ a#text-plugin
501501

502502
You'll create an _options_ object with the translation providers from `getTranslationProviders`
503503
and pass it to `bootstrapModule`.
504-
Open the `src/app/main.ts` and modify the bootstrap code as follows:
505-
+makeExample('cb-i18n/ts/src/app/main.ts', null, 'src/app/main.ts')(format=".")
504+
Open the `src/main.ts` and modify the bootstrap code as follows:
505+
+makeExample('cb-i18n/ts/src/main.ts', null, 'src/main.ts')(format=".")
506506
:marked
507507
Notice that it waits for the `getTranslationProviders` promise to resolve before
508508
bootstrapping the app.

public/docs/ts/latest/cookbook/set-document-title.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ figure.image-display
6161
Here's the complete solution
6262

6363
+makeTabs(
64-
`cb-set-document-title/ts/src/app/main.ts,
64+
`cb-set-document-title/ts/src/main.ts,
6565
cb-set-document-title/ts/src/app/app.module.ts,
6666
cb-set-document-title/ts/src/app/app.component.ts`,
6767
'',
68-
'src/app/main.ts, src/app/app.module.ts, src/app/app.component.ts' )
68+
'src/main.ts, src/app/app.module.ts, src/app/app.component.ts' )
6969

7070
//
7171
Todo: tie this back to the router so we can see how to use this Title service to (re)set the title

public/docs/ts/latest/guide/appmodule.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ l-main-section
103103
and you'll run it in a browser. You can learn about other options later.
104104

105105
The recommended place to bootstrap a JIT-compiled browser application is in a separate file
106-
in the `app` folder named `src/app/main.ts`
107-
+makeExample('setup/ts/src/app/main.ts','','src/app/main.ts')(format='.')
106+
in the `src` folder named `src/main.ts`
107+
+makeExample('setup/ts/src/main.ts','','src/main.ts')(format='.')
108108
:marked
109109
This code creates a browser platform for dynamic (JIT) compilation and
110110
bootstraps the `AppModule` described above.

public/docs/ts/latest/guide/architecture.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ block angular-modules
9898
Launch an application by _bootstrapping_ its root module.
9999
During development you're likely to bootstrap the `AppModule` in a `main.ts` file like this one.
100100

101-
+makeExample('src/app/main.ts', '', 'src/app/main.ts')(format='.')
101+
+makeExample('src/main.ts', '', 'src/main.ts')(format='.')
102102

103103
:marked
104104
### Angular modules vs. JavaScript modules

public/docs/ts/latest/guide/attribute-directives.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ figure.image-display
337337
attribute-directives/ts/src/app/app.component.html,
338338
attribute-directives/ts/src/app/highlight.directive.ts,
339339
attribute-directives/ts/src/app/app.module.ts,
340-
attribute-directives/ts/src/app/main.ts,
340+
attribute-directives/ts/src/main.ts,
341341
attribute-directives/ts/index.html
342342
`,
343343
'',

public/docs/ts/latest/guide/dependency-injection.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ block ctor-syntax
247247
We don't have to create an Angular injector.
248248
Angular creates an application-wide injector for us during the bootstrap process.
249249

250-
+makeExcerpt('src/app/main.ts', 'bootstrap')
250+
+makeExcerpt('src/main.ts', 'bootstrap')
251251

252252
:marked
253253
We do have to configure the injector by registering the **providers**

public/docs/ts/latest/guide/deployment.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ a#node-modules
135135
+makeTabs(
136136
`deployment/ts/index.html,
137137
deployment/ts/systemjs.config.server.js,
138-
deployment/ts/src/app/main.ts,
138+
deployment/ts/src/main.ts,
139139
deployment/ts/src/app/app.module.ts,
140140
deployment/ts/src/app/app.component.ts,
141141
deployment/ts/src/app/crisis-list.component.ts,
@@ -144,7 +144,7 @@ a#node-modules
144144
null,
145145
`index.html,
146146
systemjs.config.server.js,
147-
src/app/main.ts,
147+
src/main.ts,
148148
src/app/app.module.ts,
149149
src/app/app.component.ts,
150150
src/app/crisis-list.component.ts,
@@ -336,7 +336,7 @@ code-example(format="nocode").
336336

337337
To enable [production mode](../api/core/index/enableProdMode-function.html) when running remotely, add the following code to the `main.ts`.
338338

339-
+makeExample('src/app/main.ts', 'enableProdMode','src/app/main.ts (enableProdMode)')(format=".")
339+
+makeExample('src/main.ts', 'enableProdMode','src/main.ts (enableProdMode)')(format=".")
340340

341341
a#lazy-loading
342342
:marked

public/docs/ts/latest/guide/displaying-data.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,6 @@ block final-code
269269
+makeTabs(`displaying-data/ts/src/app/app.component.ts,
270270
displaying-data/ts/src/app/hero.ts,
271271
displaying-data/ts/src/app/app.module.ts,
272-
displaying-data/ts/src/app/main.ts`,
272+
displaying-data/ts/src/main.ts`,
273273
'final,,,',
274274
'src/app/app.component.ts, src/app/hero.ts, src/app/app.module.ts, main.ts')

public/docs/ts/latest/guide/forms.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ figure.image-display
681681
forms/ts/src/app/hero.ts,
682682
forms/ts/src/app/app.module.ts,
683683
forms/ts/src/app/app.component.ts,
684-
forms/ts/src/app/main.ts,
684+
forms/ts/src/main.ts,
685685
forms/ts/index.html,
686686
forms/ts/forms.css`,
687687
'final, final,,,,,',

public/docs/ts/latest/guide/ngmodule.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ a#bootstrap
140140
In the first, _dynamic_ option, the [Angular compiler](../cookbook/ngmodule-faq.html#q-angular-compiler "About the Angular Compiler")
141141
compiles the application in the browser and then launches the app.
142142

143-
+makeExample('ngmodule/ts/src/app/main.ts', '', 'src/app/main.ts (dynamic)')(format=".")
143+
+makeExample('ngmodule/ts/src/main.ts', '', 'src/main.ts (dynamic)')(format=".")
144144
:marked
145145
The samples in this page demonstrate the dynamic bootstrapping approach.
146146

@@ -159,7 +159,7 @@ a#bootstrap
159159
The syntax for bootstrapping the pre-compiled `AppModuleNgFactory` is similar to
160160
the dynamic version that bootstraps the `AppModule` class.
161161

162-
+makeExample('ngmodule/ts/src/app/main-static.ts', '', 'src/app/main.ts (static)')(format=".")
162+
+makeExample('ngmodule/ts/src/app/main-static.ts', '', 'src/main.ts (static)')(format=".")
163163
:marked
164164
Because the entire application was pre-compiled,
165165
we don't ship the _Angular Compiler_ to the browser and we don't compile in the browser.

public/docs/ts/latest/guide/router.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ a#redirect
672672
+makeTabs(
673673
`router/ts/src/app/app.component.1.ts,
674674
router/ts/src/app/app.module.1.ts,
675-
router/ts/src/app/main.ts,
675+
router/ts/src/main.ts,
676676
router/ts/src/app/hero-list.component.ts,
677677
router/ts/src/app/crisis-list.component.ts,
678678
router/ts/src/app/not-found.component.ts,

public/docs/ts/latest/guide/setup.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ block core-files
121121
+makeTabs(`
122122
setup/ts/src/app/app.component.ts,
123123
setup/ts/src/app/app.module.ts,
124-
setup/ts/src/app/main.ts
124+
setup/ts/src/main.ts
125125
`, '', `
126126
src/app/app.component.ts,
127127
src/app/app.module.ts,
128-
src/app/main.ts
128+
src/main.ts
129129
`)(format='.')
130130

131131
:marked

public/docs/ts/latest/guide/upgrade.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,11 +1103,11 @@ code-example(format="").
11031103
attached to the `<html>` element of the host page. This will no longer work with
11041104
Angular. We should switch to a JavaScript-driven bootstrap instead.
11051105

1106-
So, remove the `ng-app` attribute from `index.html`, and instead bootstrap via `app/main.ts`.
1106+
So, remove the `ng-app` attribute from `index.html`, and instead bootstrap via `src/main.ts`.
11071107
This file has been configured as the application entrypoint in `systemjs.config.js`,
11081108
so it is already being loaded by the browser.
11091109

1110-
+makeExample('upgrade-phonecat-2-hybrid/ts/app/main.ts', 'bootstrap')
1110+
+makeExample('upgrade-phonecat-2-hybrid/ts/src/main.ts', 'bootstrap')
11111111

11121112
:marked
11131113
The arguments used here are the root element of the application (which is
@@ -1459,7 +1459,7 @@ code-example(format="").
14591459
Now we can drop `upgrade.bootstrap` from our application bootstrap, and remove the
14601460
`ngDoBootstrap()` override from `app.module.ts`
14611461

1462-
+makeExample('upgrade-phonecat-3-final/ts/app/main.ts', null, 'main.ts')
1462+
+makeExample('upgrade-phonecat-3-final/ts/src/main.ts', null, 'main.ts')
14631463
+makeExample('upgrade-phonecat-3-final/ts/app/app.module.ts', null, 'app.module.ts')
14641464

14651465
:marked

0 commit comments

Comments
 (0)