Post saved me a lot of time and frustration, much appreciated =)

On Thursday, October 18, 2012 12:48:59 AM UTC-4, Jay B wrote:
>
> Annnnnd, I eat my words.
>
> It is clearly explained here: http://docs.angularjs.org/guide/directive
>
> & or &attr - provides a way to execute an expression in the context of 
>> the parent scope. If no attr name is specified then the local name and 
>> attribute name are same. Given <widget my-attr="count = count + value"> and 
>> widget definition of scope: { localFn:'increment()' }, then isolate 
>> scope property localFn will point to a function wrapper for the 
>> increment() expression. Often it's desirable to pass data from the 
>> isolate scope via an expression and to the parent scope, *this can be 
>> done by passing a map of local variable names and values into the 
>> expression wrapper fn*. For example, if the expression is 
>> increment(amount) then we can specify the amount value by calling the 
>> localFn aslocalFn({amount: 22}).
>
>
> This is not very intuitive. Could the doc maintainers maybe bold the above 
> point or reword it? It would be nice if we could just call the delegate 
> function with params by order ...
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to