angular2-style-guide
angular2-style-guide copied to clipboard
Style for *ngFor
I saw several kinds of codes online, they are all working well, but I am not sure which style is recommended.
These are three of them:
*ngFor="#alert of alerts #i = index #l = last"
*ngFor="#alert of alerts; #i = index, #l = last"
*ngFor="#alert of alerts; #i = index; #l = last"
Maybe add one style guide for this? Thanks
I'm mostly for *ngFor="var alert of alerts; var i = index; var l = last
.
Any other opinions?
I prefer
*ngFor="#alert of alerts;#i = index;#l = last;"
I think they are all fine, just pick one for the entire style-guide and point to the template syntax doc ?