Here is the error:
"let-" is only supported on template elements. ("On Wednesday, July 6, 2016 at 9:03:27 PM UTC+5:30, Apurv Singhal wrote: > > Hi, > Thanks for the reply. > I tried let-myVar, it doesn't work, gives parsing error. > > On Wednesday, July 6, 2016 at 8:22:45 PM UTC+5:30, 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]> >> 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]. >>> 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. >>> >> >> >> >> -- >> 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.
