-2

I am following the angular.io tutorial on creating a single paged application. From my understanding<[tag] *ngFor="let [localVariableName] of [arrayName]"> You should then be able to use localVariableName to access the type's member variables.
It's a bit long so I've posted it in to Pastebin. http://pastebin.com/UHewKHH4
I have already gone through the tutorial once but I am going through for the second time trying to customize it to my own needs.

Cheers.

fOrceez
  • 71
  • 8

1 Answers1

2

The localVariable name is only available within <[tag]>...</[tag]> and not in the whole template.

Plunker example

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • Excellent, thanks! For some reason in the tutorial of https://angular.io/docs/ts/latest/tutorial/toh-pt2.html, using the example of – fOrceez Oct 21 '16 at 06:47
  • Accidentally hit enter too early. Excellent, thanks! For some reason in the [tutorial(]angular.io/docs/ts/latest/tutorial/toh-pt2.html), the example describes the code `
  • ` as `The let keyword before "hero" identifies hero as a template input variable. We can reference this variable within the template to access a hero’s properties.`
  • – fOrceez Oct 21 '16 at 06:49
  • Could be a bit more specific. Would you mind creating a bug report in http://github.com/angular/angular.io/issues ? – Günter Zöchbauer Oct 21 '16 at 06:52
  • 1
    Done and dusted. Cheers mate – fOrceez Oct 21 '16 at 06:57