Skip to content

Commit ee1e712

Browse files
committed
feat(demo): add more content
1 parent 98bed32 commit ee1e712

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

projects/elements-demo/src/app/features/docs/faq/faq.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,12 @@ const FAQ = [
4545
'When do we need to use <code>*axLazyElement="module: true"</code> flag?',
4646
answer:
4747
'Some web components libraries might be distributed using ES modules, for example if we look at <a href="https://unpkg.com/@material/mwc-button@0.6.0/mwc-button.js?module" target="_blank">@material/mwc-button</a> we will see that it imports additional things like <code>@material/mwc-base</code> using import statement in its implementation. This means it will need to download multiple files compared to a single bundle when using Angular elements. To make this work, library has to generate <code>\t&#60;script type="module"></code> instead of just plain <code>\t&#60;script></code> tag.'
48+
},
49+
{
50+
question: 'Angular elements / web components / custom elements / what?',
51+
answer:
52+
'In the docs, we often use phrase "Angular elements (or any other web component)" but this may sound a bit vague without previous insight into the topic... <br><br>' +
53+
'The web standard is in fact called "Web Components" and it uses <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements" target="_blank">Custom Elements API</a> to create and use web components which are <strong>new custom, reusable, encapsulated HTML tags</strong> to use in web pages and web apps.<br><br>' +
54+
"Angular Elements wraps Angular components using <code>HTMLElement</code> APIs and then uses Custom Elements API, more precisely the <code>customElements.define('some-element', SomeComponentElement)</code> syntax to register it for the use in the web page."
4855
}
4956
];

projects/elements-demo/src/app/features/docs/use-cases/use-cases.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,13 @@ <h2>Microfrontends style "sub-applications"</h2>
352352
</g>
353353
</svg>
354354

355+
<p>
356+
Or we can face situation when we are running different versions of the same
357+
widget in various apps which may cause other problems related to breaking
358+
changes, incompatible data models which may introduce additional complexity
359+
for backends...
360+
</p>
361+
355362
<blockquote class="large">
356363
Wouldn't it be great if we could deploy new version of our widget
357364
independently from release cycle of consumer applications?

0 commit comments

Comments
 (0)