Posted By Weston Ganger
Some angular directives create a new scope such as ng-if or ng-include
ng-if
ng-include
If you want to set a variable inside that scope add the ng-init attribute to the element
ng-init
<div ng-include="path/to/your_template.html" ng-init="my_var = 'hello world';"></div>
Related External Links:
Article Topic:Software Development - Angular
Date:January 11, 2016
Want me to help develop your next Ruby-on-Rails project or application?
604-309-8713info@solidfoundationwebdev.com
I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.