docs: couple of small UI fixes throughout some documents (#31155)

PR Close #31155
This commit is contained in:
Alan 2019-06-27 15:55:47 +02:00 committed by Alex Rickabaugh
parent f2360aab9d
commit 6c0cca093a
3 changed files with 25 additions and 39 deletions

View File

@ -29,7 +29,7 @@ ng generate app-shell --client-project my-app --universal-project server-app
After running this command you will notice that the `angular.json` configuration file has been updated to add two new targets, with a few other changes.
<code-example format="." language="none" linenums="false">
<code-example format="." language="json" linenums="false">
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {

View File

@ -153,16 +153,13 @@ The list is by no means exhaustive, but should provide you with a good starting
(https://ngmilk.rocks/2015/03/09/angularjs-html5-mode-or-pretty-urls-on-apache-using-htaccess/):
<code-example format=".">
RewriteEngine On
&#35 If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ - [L]<br>
&#35 If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
</code-example>
@ -170,18 +167,15 @@ The list is by no means exhaustive, but should provide you with a good starting
[Front Controller Pattern Web Apps](https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#front-controller-pattern-web-apps),
modified to serve `index.html`:
<code-example format=".">
try_files $uri $uri/ /index.html;
</code-example>
```
try_files $uri $uri/ /index.html;
```
* [IIS](https://www.iis.net/): add a rewrite rule to `web.config`, similar to the one shown
[here](http://stackoverflow.com/a/26152011/2116927):
<code-example format='.' linenums="false">
<code-example format='.' language="xml" linenums="false">
&lt;system.webServer&gt;
&lt;rewrite&gt;
&lt;rules&gt;
@ -196,7 +190,6 @@ modified to serve `index.html`:
&lt;/rules&gt;
&lt;/rewrite&gt;
&lt;/system.webServer&gt;
</code-example>
@ -214,13 +207,11 @@ and to
* [Firebase hosting](https://firebase.google.com/docs/hosting/): add a
[rewrite rule](https://firebase.google.com/docs/hosting/url-redirects-rewrites#section-rewrites).
<code-example format=".">
<code-example format="." language="json">
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]
</code-example>
{@a cors}
@ -446,23 +437,19 @@ When you create a production build using [`ng build --prod`](cli/build), the CLI
The `index.html` file is also modified during the build process to include script tags that enable differential loading. See the sample output below from the `index.html` file produced during a build using `ng build`.
<code-example language="html" format="." linenums="false">
<!-- ... -->
<body>
<app-root></app-root>
<script src="runtime-es2015.js" type="module"></script>
<script src="runtime-es5.js" nomodule></script>
<script src="polyfills-es2015.js" type="module"></script>
<script src="polyfills-es5.js" nomodule></script>
<script src="styles-es2015.js" type="module"></script>
<script src="styles-es5.js" nomodule></script>
<script src="vendor-es2015.js" type="module"></script>
<script src="vendor-es5.js" nomodule></script>
<script src="main-es2015.js" type="module"></script>
<script src="main-es5.js" nomodule></script>
</body>
<!-- ... -->
&lt;body>
&lt;app-root>&lt;/app-root>
&lt;script src="runtime-es2015.js" type="module">&lt;/script>
&lt;script src="runtime-es5.js" nomodule>&lt;/script>
&lt;script src="polyfills-es2015.js" type="module">&lt;/script>
&lt;script src="polyfills-es5.js" nomodule>&lt;/script>
&lt;script src="styles-es2015.js" type="module">&lt;/script>
&lt;script src="styles-es5.js" nomodule>&lt;/script>
&lt;script src="vendor-es2015.js" type="module">&lt;/script>
&lt;script src="vendor-es5.js" nomodule>&lt;/script>
&lt;script src="main-es2015.js" type="module">&lt;/script>
&lt;script src="main-es5.js" nomodule>&lt;/script>
&lt;/body>
</code-example>
Each script tag has a `type="module"` or `nomodule` attribute. Browsers with native support for ES modules only load the scripts with the `module` type attribute and ignore scripts with the `nomodule` attribute. Legacy browsers only load the scripts with the `nomodule` attribute, and ignore the script tags with the `module` type that load ES modules.
@ -523,7 +510,7 @@ By default, legacy browsers such as IE 9-11 are ignored, and the compilation tar
<div class="alert is-important">
To see which browsers are supported with the above configuration, see which settings meet to your browser support requirements, see the [Browserslist compatibility page](https://browserl.ist/?q=%3E+0.5%25%2C+last+2+versions%2C+Firefox+ESR%2C+Chrome+41%2C+not+dead%2C+not+IE+9-11).
To see which browsers are supported with the above configuration, see which settings meet to your browser support requirements, see the [Browserslist compatibility page](https://browserl.ist/?q=%3E+0.5%25%2C+last+2+versions%2C+Firefox+ESR%2C+not+dead%2C+not+IE+9-11).
</div>
@ -660,7 +647,7 @@ ng test --configuration es5
### Configuring the e2e command
Create an ES5 serve configuration as explained above (link to the above serve section), and configuration an ES5 configuration for the E2E target.
Create an [ES5 serve configuration](guide/deployment#configuring-serve-for-es5) as explained above, and configuration an ES5 configuration for the E2E target.
<code-example language="json" format="." linenums="false">

View File

@ -454,10 +454,9 @@ A form of property [data binding](#data-binding) in which a [template expression
That text can be concatenated with neighboring text before it is assigned to an element property
or displayed between element tags, as in this example.
<code-example language="html" escape="html">
<label>My current hero is {{hero.name}}</label>
</code-example>
```html
<label>My current hero is {{hero.name}}</label>
```
Read more about [interpolation](guide/template-syntax#interpolation) in [Template Syntax](guide/template-syntax).