Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style for *ngFor #44

Open
hongbo-miao opened this issue Mar 29, 2016 · 3 comments
Open

Style for *ngFor #44

hongbo-miao opened this issue Mar 29, 2016 · 3 comments

Comments

@hongbo-miao
Copy link

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

@mgechev
Copy link
Owner

mgechev commented Apr 6, 2016

I'm mostly for *ngFor="var alert of alerts; var i = index; var l = last.

Any other opinions?

@yuyang041060120
Copy link

I prefer

*ngFor="#alert of alerts;#i = index;#l = last;"

@ludohenin
Copy link

I think they are all fine, just pick one for the entire style-guide and point to the template syntax doc ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants