You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Webpack: an Introduction</a>. Or, learn more about SystemJS configuration in general <ahref="https://github.com/systemjs/systemjs/blob/master/docs/config-api.md"target="_blank">here</a>.
131
125
132
126
133
-
h2#install-packages#{_Install} packages
127
+
h3#install-packages#{_Install} packages
134
128
blockinstall-packages
135
129
:marked
136
130
Using npm from the command line, install the packages listed in `package.json` with the command:
@@ -154,22 +148,25 @@ block install-packages
154
148
155
149
:marked
156
150
You're now ready to write some code!
157
-
+ifDocsFor('ts')
151
+
158
152
.l-main-section
159
-
h1#ngmodule Step 2: Create your application
153
+
h2#ngmodule Step 2: Create your application
154
+
155
+
blockcreate-your-app
160
156
:marked
161
157
You compose Angular applications into closely related blocks of functionality with
162
158
[NgModules](guide/ngmodule.html). Angular itself is split into separate Angular Modules. This
163
159
makes it possible for you to keep payload size small by only importing the parts of Angular
164
160
that your application needs.
165
161
166
162
Every Angular application has at least one module: the _root module_, named `AppModule` here.
167
-
163
+
:marked
168
164
**Create #{_an} #{_appDir} subfolder** off the project root directory:
169
165
170
166
code-example.code-shell.
171
167
mkdir #{_appDir}
172
168
169
+
+ifDocsFor('ts')
173
170
:marked
174
171
Create the file `app/app.module.ts` with the following content:
175
172
@@ -193,26 +190,27 @@ block install-packages
193
190
[Tour of Heroes Tutorial](./tutorial/).
194
191
195
192
.l-main-section
196
-
h1#root-component Step !{step++}: Create a component and add it to your application
193
+
h2#root-component Step 3: Create a component and add it to your application
194
+
197
195
:marked
198
196
Every Angular application has at least one component: the _root component_, named `AppComponent`
199
197
here.
200
198
201
199
Components are the basic building blocks of Angular applications. A component controls a portion
202
200
of the screen—a *view*—through its associated template.
203
201
204
-
a#app-component
205
-
p.
206
-
#[b Create the component file]
207
-
#[code #[+adjExPath('app/app.component.ts')]] with the following content:
202
+
#app-component
203
+
:marked
204
+
**Create the component file** <span ngio-ex>app/app.component.ts</span> with the following content:
208
205
209
206
+makeExample('app/app.component.ts')
210
207
208
+
- var _decorator_function = _docsFor =='dart'?'annotation':'decorator function';
211
209
:marked
212
210
The QuickStart application has the same essential structure as any other Angular component:
213
211
214
212
* **An import statement**. Importing gives your component access to
0 commit comments