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

check-pipe breaks with ngFor #346

Closed
cexbrayat opened this issue Jun 21, 2017 · 10 comments
Closed

check-pipe breaks with ngFor #346

cexbrayat opened this issue Jun 21, 2017 · 10 comments
Assignees
Labels

Comments

@cexbrayat
Copy link
Contributor

cexbrayat commented Jun 21, 2017

It looks like the new check-pipe rule breaks with ngFor (as of 3.1.1):

<div *ngFor="let user of users | slice:0:4">

Throws:

The pipe operator should be surrounded by one space on each side, i.e. " | "

See #347 for a unit test reproducing the issue.

@intellix
Copy link

intellix commented Jun 22, 2017

and an ngSwitch at least. Not sure which others are missing, maybe ngIf?

@mgechev
Copy link
Owner

mgechev commented Jun 23, 2017

Thanks for reporting the issue. I will take a look during the weekend on AngularUP.

@rokerkony
Copy link
Contributor

rokerkony commented Jun 23, 2017

Other two cases which fail on the check-pipe rule:

  1. {{ (foo) | pipe }} our code example: {{ (totalPrice || price.total) | eur }}
  2. <div *ngIf="items$ | async as items; else loading;"></div>

@mgechev mgechev self-assigned this Jun 27, 2017
@mgechev mgechev closed this as completed in fa08a3b Jul 1, 2017
@rokerkony
Copy link
Contributor

@mgechev this issue is closed but the use case n.2 was not fixed... can you take a look on it?

@mgechev
Copy link
Owner

mgechev commented Jul 5, 2017

There's another issue related to "check-pipe" #365. Looks the same as the one reported by you.

@rokerkony
Copy link
Contributor

ok, thx :)

@cexbrayat
Copy link
Contributor Author

@mgechev I tried 3.1.2 but it still fail for ngFor in a simple use case, with an external template.

See #368 for a unit test reproducing the issue.

@mgechev
Copy link
Owner

mgechev commented Jul 5, 2017

See #365

@cexbrayat
Copy link
Contributor Author

@mgechev Ha sorry, I thought #365 was unrelated to this one (the title was not really explicit :) ).

@mgechev
Copy link
Owner

mgechev commented Jul 5, 2017

No worries

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

No branches or pull requests

4 participants