docs(elements): add ng-add docs to elements guide (#23350)

PR Close #23350
This commit is contained in:
Rob Wormald 2018-04-12 16:15:18 -07:00 committed by Igor Minar
parent 0e10e731dc
commit 74b203a55e
1 changed files with 4 additions and 2 deletions

View File

@ -109,12 +109,14 @@ The recently-developed [custom elements](https://developer.mozilla.org/en-US/doc
<tr>
<td>Edge</td>
<td>Working on an implementation. <br>
Use the <a href="https://cli.angular.io/" target="_blanks">CLI</a> to automatically set up your project with the correct polyfill: <code>ng add @angular/elements</code>.
</td>
</tr>
</table>
In browsers that support Custom Elements natively, the specification requires developers use ES2015 classes to define Custom Elements - developers can opt-in to this by setting the `target: "es2015"` property in their project's `tsconfig.json`. As Custom Element and ES2015 support may not be available in all browsers, developers can instead choose to use a polyfill to support older browsers and ES5 code.
Use the [Angular CLI](https://cli.angular.io/) to automatically set up your project with the correct polyfill: `ng add @angular/elements --name=*your_project_name*`.
- For more information about polyfills, see [polyfill documentation](https://www.webcomponents.org/polyfills).
- For more information about Angular browser support, see [Browser Support](guide/browser-support).