Vheissu / aurelia-for-real-world-web-applications-book-feedback

Post feedback as issues here on Github for the Aurelia book. Be as descriptive and honest as you like.
15 stars 0 forks source link

Example "with" attribute #54

Closed zantinger closed 8 years ago

zantinger commented 8 years ago

Hi. I have copy/past the example for the with attribute in my app. But when I run the app, I get an error:

ERROR [app-router] Error: Error invoking Test. Check the inner error for details. 
inner error: ReferenceError: role is not defined

The Route for the view/viewmodel is showing in the menu correctly.

zantinger commented 8 years ago

Additionally, what is the activate() methode? It's not a Component Lifecycle, or? Is there a listing for more methods like activate()?

zantinger commented 8 years ago

After a little research in older posts I have found this post: https://github.com/Vheissu/aurelia-for-real-world-web-applications-book-feedback/issues/33 when I change your code into a separate class for user and then create a new user() in the export class, then I work for me.