Request: Add `template` to RenderComponentOptions
See original GitHub issueTypeScript cannot determine which Type
is a component or directive. Because template
is from only RenderDirectiveOptions
, TypeScript language service cannot suggest it for autocompletion.
In my opinion, render(Comp, { template })
is a common use-case, and it actually works well. I’m using render(Comp, { template }
for my specs to use it as a living usage documentation at same time.
it('should accept [someFlag]', async () => {
await render(FooComponent, {
template: `<app-foo [someFlag]="true"></app-foo>`
})
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Introduction to components and templates - Angular
An Angular application uses individual components to define and control ... A template is a form of HTML that tells Angular how to...
Read more >How to pass a custom template to an Angular component?
Solution #2: Passing templates around with ng-template and ng-container ... The above content is not rendered in the DOM by default. We need...
Read more >7 Ways to Define a Component Template in Vue.js
The quickest and easiest way to define a Vue component template is to add a template property to the component definition and assign...
Read more >How To Use Templates in a Flask Application - DigitalOcean
In Flask, you can use the Jinja templating language to render HTML templates. A template is a file that can contain both fixed...
Read more >Angular - Render a template in a sibling component
I would like the #options template to be displayed in the side-panel component which is a sibling of A component. <ng-template #options> <input ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d like to create a PR as my first contribution for testing-library! 👍 I’ll work on it in a few days.
🎉 This issue has been resolved in version 10.6.0 🎉
The release is available on:
npm package (@latest dist-tag)
Your semantic-release bot 📦🚀