-
Notifications
You must be signed in to change notification settings - Fork 278
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
Angular variables don't work #86
Comments
I'm not sure to understand your question. Bindonce access ony the scope as it is supposed to be and as the ng-* directives do as well. If you want to publish a service's variable into the DOM you should create your own directive and inject the service to it or use the controller to elaborate the value got from the service and make it available to the view, if you don't want to create a new directive you could modify bindonce and inject the service into it but I wouldn't suggest this solution. For what regards the workaround, yes it works and I often see people using that system in their code, however don't abuse of it, things can easily get messy and out of control. |
Simple example: With angular variable interpolation you can do stuff like that: For that to work with bindonce, you need to set Is this behavior intended? As you set it might get easily messy... |
With which version of AngularJs you can do |
I'm using Angular 1.3 |
Can you provide a working example of what you are stating? |
Oh boy, I tricked my self. You are right! 💫 |
No problem, it happens 😃 |
When I want to use auto injected angular variables such as
$route
they are not available for bindonce. I guess bindonce really just has access to the$scope
and doesn't autoinject on its own.But this functionality would be really convenient. My current workaround is manually assigning the necessary variables to the
$scope
.The text was updated successfully, but these errors were encountered: