angular2-authentication-sample icon indicating copy to clipboard operation
angular2-authentication-sample copied to clipboard

Exception when pipe is added

Open frankbenoit opened this issue 10 years ago • 3 comments

Hi please have a look at these modifcations: https://github.com/frankbenoit/angular2-authentication-sample/commit/5910ed3f19a45a84e338463ac1a5cee0fc97f477

I don't know if this is a problem in my pipe usage, in the auth sample code, or in angular2?!

I added a list of text item and a pipe to 'home'.

Good cases:

  1. If logged in, home can be opened normally.
  2. Before having the pipe, when not logged in; opening 'home' directly, the routeroutlet navigates to 'login'.

Now the bad case: Now with the pipe, not logged in and opening 'home' directly, an exception happens and the app crashes

Can you help?

frankbenoit avatar Jan 09 '16 09:01 frankbenoit

to change between good case and bad case, just change in home.html the line 15:

<li *ngFor="#item of items          ">{{item}}</li>
<li *ngFor="#item of items | orderBy">{{item}}</li>

frankbenoit avatar Jan 09 '16 09:01 frankbenoit

Hi, I also work on a testing project where I added angular2-jwt. I have the exactly the same error like @frankbenoit

Tried to add pipe import in several places to see if it changes behaviour. Still the error.

tobika avatar Jan 20 '16 19:01 tobika

Would you be able to post the stack trace here? What is the exception that is thrown? Thanks!

chenkie avatar Feb 26 '16 04:02 chenkie