-
Notifications
You must be signed in to change notification settings - Fork 276
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
Custom dynamic template #190
Comments
my recommendation is that you $templateCache the template before you use it. |
Can't this work without caching the template? I have separate logic that triggers caching process for release build. This may create a conflict. |
The official recommendation from angular is to provide the templates already cached. The problem here is that you won't get a valid toast the first time you use it (because the toast will be shown before the template gets fetched) and there is no way around that for this kind of widgets. |
@Foxandxss Check this plunker. I tried creating toast more than 2 times, custom-template is not rendered. http://plnkr.co/edit/FuXKAPkmOOM1IcqNRuIs?p=preview May be I am doing something wrong. |
Custom templates can't be changed on the toast, needs to be changed on |
Oh, that means I can only set one template at a time. I would like to render different templates for different toasts. |
I also tried to set a custom template, only to detect that the options "iconClasses" and "templates" are considered "bad Options" and are deleted in Please update the documentation; it now clearly says "The second option is to pass a third parameter". I have searched in vain for a hint that "templates" or "iconClasses" cannot be used for the second option. |
I would like to dynamically change the toast template. Using the following code doesn't work, renders the same template:
The text was updated successfully, but these errors were encountered: