-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attaching dynamic templates to a component #13495
Comments
metadata doesn't exist after aot compilation |
I am able to fetch the component metadata using the window['Reflect'] object in constructor of the component class. |
I think you may be looking for something like |
This is what I am trying to implement. |
Thank you for this feature request. Unfortunately we are not able to make this change as it would break the ability for applications to be compiled ahead of time which drives much of our optimizations and code size reduction effort. To improve the ability to dynamically select components at runtime we are introducing |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a feature request
Current behavior
@component{
selector:'selector-name',
templateUrl:'url to template file'
}
Expected behavior
We should be able to get the class metadata and should be able to update its templateUrl or any key of annotations.
What is the motivation / use case for changing the behavior?
We should be able to dynamically pass the templateUrl and one component can be initialized using different templateUrl. this will help the developer to flexibly use the same component but using some other template.
Please tell us about your environment:
Any
Angular version: 2.0.X
Any
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: