Can not read property 'id' of undefined

0

I'm getting an error while entering the bug-details route, before even clicking the routerlink to try to access edit-bug, which is my intention. The error is:

  

ERROR TypeError: Can not read property 'id' of undefined       at Object.eval [as updateDirectives] (BugDetailComponent.html: 14)

Can you give me a hand? The code is at link

    
asked by anonymous 29.11.2018 / 19:15

1 answer

1

Statement

bug: any;

Correction

const bug = bugDetails[i];
//para
this.bug = bugDetails[i];

As you stated as a constant , the template can not reference

    
29.11.2018 / 19:35