Hey Ben, For component references like #email="ngModel", is there any way to dynamically name #email? I have a lot of boilerplate creating inputs, divs for error messages for each control and I'm thinking just making a component with a passed in name would reduce complexity. Any ideas?
On Wednesday, July 6, 2016 at 7:52:45 AM UTC-7, Ben Nadel wrote: > > I believe you have to use > > let-myVar="myVal" > > #var is only for actual element/component references in recent version. > > Cheers, > Ben > > On Wed, Jul 6, 2016 at 10:46 AM, Apurv Singhal <[email protected] > <javascript:>> wrote: > >> How do I set local variables inside html templates? >> <span #myVar="myVal"></span> gives an error >> *ngFor lets you set a local variable using let but that is only for >> arrays. >> >> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/angular. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Ben Nadel > Lover of JavaScript > http://www.bennadel.com > -- 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 https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
