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. 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": { "server": {
"builder": "@angular-devkit/build-angular:server", "builder": "@angular-devkit/build-angular:server",
"options": { "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/): (https://ngmilk.rocks/2015/03/09/angularjs-html5-mode-or-pretty-urls-on-apache-using-htaccess/):
<code-example format="."> <code-example format=".">
RewriteEngine On RewriteEngine On
&#35 If an existing asset or directory is requested go to it as it is &#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} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L] RewriteRule ^ - [L]<br>
&#35 If the requested resource doesn't exist, use index.html &#35 If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html RewriteRule ^ /index.html
</code-example> </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), [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`: modified to serve `index.html`:
<code-example format="."> ```
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
```
</code-example>
* [IIS](https://www.iis.net/): add a rewrite rule to `web.config`, similar to the one shown * [IIS](https://www.iis.net/): add a rewrite rule to `web.config`, similar to the one shown
[here](http://stackoverflow.com/a/26152011/2116927): [here](http://stackoverflow.com/a/26152011/2116927):
<code-example format='.' linenums="false"> <code-example format='.' language="xml" linenums="false">
&lt;system.webServer&gt; &lt;system.webServer&gt;
&lt;rewrite&gt; &lt;rewrite&gt;
&lt;rules&gt; &lt;rules&gt;
@ -196,7 +190,6 @@ modified to serve `index.html`:
&lt;/rules&gt; &lt;/rules&gt;
&lt;/rewrite&gt; &lt;/rewrite&gt;
&lt;/system.webServer&gt; &lt;/system.webServer&gt;
</code-example> </code-example>
@ -214,13 +207,11 @@ and to
* [Firebase hosting](https://firebase.google.com/docs/hosting/): add a * [Firebase hosting](https://firebase.google.com/docs/hosting/): add a
[rewrite rule](https://firebase.google.com/docs/hosting/url-redirects-rewrites#section-rewrites). [rewrite rule](https://firebase.google.com/docs/hosting/url-redirects-rewrites#section-rewrites).
<code-example format="."> <code-example format="." language="json">
"rewrites": [ { "rewrites": [ {
"source": "**", "source": "**",
"destination": "/index.html" "destination": "/index.html"
} ] } ]
</code-example> </code-example>
{@a cors} {@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`. 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"> <code-example language="html" format="." linenums="false">
&lt;body>
<!-- ... --> &lt;app-root>&lt;/app-root>
<body> &lt;script src="runtime-es2015.js" type="module">&lt;/script>
<app-root></app-root> &lt;script src="runtime-es5.js" nomodule>&lt;/script>
<script src="runtime-es2015.js" type="module"></script> &lt;script src="polyfills-es2015.js" type="module">&lt;/script>
<script src="runtime-es5.js" nomodule></script> &lt;script src="polyfills-es5.js" nomodule>&lt;/script>
<script src="polyfills-es2015.js" type="module"></script> &lt;script src="styles-es2015.js" type="module">&lt;/script>
<script src="polyfills-es5.js" nomodule></script> &lt;script src="styles-es5.js" nomodule>&lt;/script>
<script src="styles-es2015.js" type="module"></script> &lt;script src="vendor-es2015.js" type="module">&lt;/script>
<script src="styles-es5.js" nomodule></script> &lt;script src="vendor-es5.js" nomodule>&lt;/script>
<script src="vendor-es2015.js" type="module"></script> &lt;script src="main-es2015.js" type="module">&lt;/script>
<script src="vendor-es5.js" nomodule></script> &lt;script src="main-es5.js" nomodule>&lt;/script>
<script src="main-es2015.js" type="module"></script> &lt;/body>
<script src="main-es5.js" nomodule></script>
</body>
<!-- ... -->
</code-example> </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. 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"> <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> </div>
@ -660,7 +647,7 @@ ng test --configuration es5
### Configuring the e2e command ### 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"> <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 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. or displayed between element tags, as in this example.
<code-example language="html" escape="html"> ```html
<label>My current hero is {{hero.name}}</label> <label>My current hero is {{hero.name}}</label>
```
</code-example>
Read more about [interpolation](guide/template-syntax#interpolation) in [Template Syntax](guide/template-syntax). Read more about [interpolation](guide/template-syntax#interpolation) in [Template Syntax](guide/template-syntax).