-
Notifications
You must be signed in to change notification settings - Fork 210
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
The move to template-url disallows the use of scoped values #11
Comments
There's an ugly way (read: hack) of using
And then use It's ugly because you have the same entry in your cache twice. |
Nice. To be honest I haven't done much testing with loading another template. Do you have any suggestions? |
I'm in the process of updating our template to account for all the changes from 0.0.6 (where there was a bug we just found about the hourly regex check was incorrectly matching a daily cron expression). I can link this issue in to my PR in our project when I have it done so you can see what we wound up doing. |
@vincentjames501 here's the PR for our project utilizing a custom template. |
@icfantv , would you be willing to update the README with a PR and document how you did it? |
@vincentjames501 yea, but it's not straightforward. i had to look at your demo and the classes themselves to see what was exposed to put into a custom template. if you were to document your classes that might make it a lot easier. |
One of the older versions of your library allowed for the specification of a user-defined template via an
options.templateUrl
property. The switch to atemplateUrl
function now no longer allows the user to use a scoped variable as, per the angular documentation, scoped values are not accessible because the template function is executed before the scope is even initialized.This means that one cannot do
template-url="{{ vm.template }}"
. I don't have a great solution here and it's clear that angular is not going to fix this issue.You can see the issue here along with an attempted fix using injected
$element
,$attrs
service values. You can ignore the parsing error and just look at the template value.The text was updated successfully, but these errors were encountered: