mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Deliver web apps with confidence 🚀
This processor will eventually replace the `{@example}` inline tags
because it provides a cleaner approach that also supports tabbed examples
straight out of the box.
The idea is that authors will simply add a `path` and (optionally) a `region`
attribute to `<code-example>` or `<code-pane>` elements in their docs.
This indicates to dgeni that the relevant example needs to be injected
into the content of this element.
For example, assume that there is an example file `toh-pt1/index.hml` with
a region called `title`, which looks like:
```
<h1>Tour of Heroes</h1>
```
Then the document author could get this to appear in the docs as a
standalone example:
```
<code-example path="toh-pt1" region="title"></code-example>
```
Or as part of a tabbed group:
```
<code-tabs>
<code-pane path="toh-pt1" region="title"></code-pane>
</code-tabs>
```
If no `path` attribute is provided then the element is ignored, which
enables authors to provide inline code instead:
```
<code-example>
Some <html> escaped code
</code-example>
```
Also all attributes other than `path` and `region` are ignored and passed
through to the final rendered output allowing the author to provide
styling hints:
```
<code-example path="toh-pt1" region="title" linenums"15" class="important">
</code-example>
```
|
||
|---|---|---|
| .github | ||
| aio | ||
| docs | ||
| integration | ||
| modules | ||
| packages | ||
| scripts | ||
| tools | ||
| .bowerrc | ||
| .clang-format | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .nvmrc | ||
| .pullapprove.yml | ||
| .travis.yml | ||
| bower.json | ||
| browser-providers.conf.js | ||
| build.sh | ||
| CHANGELOG.md | ||
| circle.yml | ||
| CONTRIBUTING.md | ||
| gulpfile.js | ||
| karma-js.conf.js | ||
| LICENSE | ||
| npm-shrinkwrap.clean.json | ||
| npm-shrinkwrap.json | ||
| npm-shrinkwrap.readme.md | ||
| package.json | ||
| protractor-e2e.conf.js | ||
| protractor-examples-e2e.conf.js | ||
| protractor-perf.conf.js | ||
| README.md | ||
| shims_for_IE.js | ||
| test-main.js | ||
| test.sh | ||
| tslint.json | ||
Safari (7+), iOS (7+), Edge (14) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript (JS) and other languages.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.