Skip to content
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

Add the template path to the toastrConfig constant #64

Closed
robertsoniv opened this issue Mar 24, 2015 · 4 comments
Closed

Add the template path to the toastrConfig constant #64

robertsoniv opened this issue Mar 24, 2015 · 4 comments

Comments

@robertsoniv
Copy link

It would be really nice if the template path were configurable rather than hard coded. I use an html2js build process that puts templates in the $templateCache based on directory structure. While using .run to add my custom template to the hard coded location works; I'd like my "alerts" module directory to have an alerts.tpl.html file that gets swallowed up by my build process and then is recognizable by angular-toastr through something like this

angular.extend(toastrConfig, { templatePath:'alerts/alerts.tpl.html'})
@Foxandxss
Copy link
Owner

Sounds reasonable to me.

@intellix
Copy link

+1 for this. I'm copying all templates from the template directory, which is used all across ui-bootstrap etc. This one uses templates so now have 2 folders :D Generally I wish it was easier in Angular to override templates

@Foxandxss
Copy link
Owner

Not as a solution for this issue (I will properly fix it with the option when I get a day to invert on this library) but you can always use $templateCache to put all your templates and as a key, the route that the directives is looking for the template.

@Foxandxss
Copy link
Owner

That is done, will release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants