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
Copy file name to clipboardExpand all lines: doc/article/en-US/app-configuration-and-startup.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,8 @@ The root component is set by calling `aurelia.setRoot()`. If no values are provi
143
143
144
144
This causes the `my-root${context.language.fileExtension}`/`my-root.html` to be loaded as the root component and injected into the `some-element` HTML element.
145
145
146
-
> Note: The content of the app host element, the one marked with `aurelia-app` or passed to `Aurelia.prototype.setRoot`, will be replaced when `Aurelia.prototype.setRoot` completes.
146
+
> Info
147
+
> The content of the app host element, the one marked with `aurelia-app` or passed to `Aurelia.prototype.setRoot`, will be replaced when `Aurelia.prototype.setRoot` completes.
147
148
148
149
> Warning: When using the `<body>` element as the app host, bear in mind that any content added prior to the completion of `Aurelia.prototype.setRoot` will be removed.
149
150
@@ -154,7 +155,7 @@ Aurelia was originally designed for Evergreen Browsers. This includes Chrome, Fi
154
155
In case you are using Webpack, create a file, e.g. `ie-polyfill.js`:
@@ -163,13 +164,12 @@ In case you are using Webpack, create a file, e.g. `ie-polyfill.js`:
163
164
After you have created the file, add it as the first file in your `aurelia-bootstrapper` bundle. You can find bundle configuration in the `webpack.config.js` file, something like:
164
165
165
166
<code-listingheading="Polyfill Configuration">
166
-
<source-codelang="JS">
167
+
<source-codelang="JavaScript">
167
168
entry: {
168
169
'app': ['./ie-polyfill', 'aurelia-bootstrapper'],
169
170
</source-code>
170
171
</code-listing>
171
172
172
-
173
173
If you are using JSPM change your `index.html` startup code as follows:
174
174
175
175
<code-listingheading="Polyfill Configuration">
@@ -196,7 +196,7 @@ If you are using JSPM change your `index.html` startup code as follows:
196
196
</source-code>
197
197
</code-listing>
198
198
199
-
> Note: Module Loaders and Bundlers
199
+
> Info: Module Loaders and Bundlers
200
200
> The code in this article demonstrates loading via SystemJS. However, these techniques can be accomplished with other module loaders just as readily. Be sure to lookup the appropriate APIs for your chosen loader or bundler in order to translate these samples into the required code for your own app.
Copy file name to clipboardExpand all lines: doc/article/en-US/contact-manager-tutorial.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ For this tutorial, we're going to use the Aurelia CLI. If you've already setup y
28
28
29
29
Once you have the prerequisites installed, you can install the Aurelia CLI itself. From the command line, use npm to install the CLI globally:
30
30
31
-
```
31
+
```Shell
32
32
npm install aurelia-cli -g
33
33
```
34
34
@@ -91,7 +91,7 @@ To begin, we're going to setup our `App` class by configuring it with a router.
91
91
</source-code>
92
92
<source-codelang="TypeScript">
93
93
import {Router, RouterConfiguration} from 'aurelia-router';
94
-
94
+
95
95
export class App {
96
96
router: Router;
97
97
@@ -151,13 +151,13 @@ We're almost done setting up the application shell. Before we're done, we need t
151
151
152
152
To get Bootstrap setup, we begin by installing the library itself with NPM. Execute the following on the command line to do this:
153
153
154
-
```
154
+
```Shell
155
155
npm install bootstrap --save
156
156
```
157
157
158
158
Next, because Bootstrap uses jQuery, we want to install jQuery as well, like this:
159
159
160
-
```
160
+
```Shell
161
161
npm install jquery@^2.2.4 --save
162
162
```
163
163
@@ -194,7 +194,7 @@ After you have modified the aurelia.json file, it is necessary to restart the `a
194
194
195
195
If you run the application now, you'll see a blank screen and the browser's console will display the following message:
196
196
197
-
```
197
+
```Output
198
198
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/src/no-selection.js
199
199
ERROR [app-router] Error: Script error for "no-selection"
200
200
```
@@ -372,7 +372,7 @@ If you go ahead and run the application, you should now see something like this:
372
372
373
373
Ok, things are starting to come together, but we still can't view an individual contact. If you try selecting something from the list, you'll see an error like the following in the console:
374
374
375
-
```
375
+
```Output
376
376
ERROR [app-router] Error: Script error for "contact-detail"
377
377
```
378
378
@@ -908,7 +908,7 @@ Let's add one more final touch to this application. Whenever we're navigating fr
908
908
909
909
Begin by installing the `nprogress` library with the following command:
Copy file name to clipboardExpand all lines: doc/article/en-US/quick-start.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,13 +84,13 @@ Yes, that's it. This is the only HTML page in our application. With this in plac
84
84
85
85
First, you can see that this document is setup as a standard HTML5 document with a doctype, html, head and body. The items of interest to us lie within (and on) the body tag. Let's look at each script tag in turn:
86
86
87
-
```
87
+
```HTML
88
88
<scriptsrc="scripts/system.js"></script>
89
89
```
90
90
91
91
This tag is used to load SystemJS, a modern JavaScript module loader. Because Aurelia is a modern framework, it's written as modules and encourages you to create your code in a modular fashion. To use modules in ${context.language.name} you need a loader that understands modular code. That's what SystemJS does. It locates modules, understands their dependencies and ensures that everything is properly loaded at runtime. Aurelia supports a variety of module loaders. Besides SystemJS, Aurelia supports all AMD-based loaders such as RequireJS, Cajon and Dojo. Aurelia also supports module-based build systems like Webpack.
@@ -99,13 +99,13 @@ As discussed previously, this line of code configures the programming language y
99
99
> Info
100
100
> In a production app, you wouldn't use a transpiler to transform code on-the-fly in the browser like we're doing here. That would perform quite poorly and require you to distribute an entire transpiler with your app. We're using this technique here to enable you to get started without any tooling or build setup needed. In a later guide, we'll show you how to use the CLI to setup a production-ready project, complete with automatic application builds and bundling.
This is the core of Aurelia itself, in a single script file. You need to add that to use the framework. That's what's going to enable all the cool capabilities we'll use in this guide.
0 commit comments