wayne
May 3, 2021, 11:09am
1
Started a new project with
npx makes aurelia test -s webpack,typescript,app-with-router
To learn about lifecycles, I add to each *.ts file in src/ (inside class):
constructor() {
console.log('<class> constructor');
}
afterBind() {
console.log('<class> afterBind');
}
afterAttach() {
console.log('<class> afterAttach');
}
When I test using npm start
, only the constructor logs show up. Why am I not getting the lifecycle events?
npx --version:
7.11.1
2 Likes
afterBind
has been changed to bound
afterAttach
has been changed to attached
Can you try again?
Also, where did you read the documentation related to these lifecycle names?
2 Likes
wayne
May 3, 2021, 11:36am
3
2 Likes
For lifecycles, you can find the information here Components Lifecycles - The Aurelia Docs
I guess @HamedFathi been busy with updating the migration doc
3 Likes
@wayne My Aurelia docs was a test just for API part.
Ignore it. As @bigopon mentioned the official doc available under https://docs.aurelia.io/ URL.
About side-by-side comparison (v1 vs v2) you can follow Components - The Aurelia Docs too.
1 Like
case112
December 28, 2021, 1:20pm
6
I wanted to mention that I stumbled upon the same issue as @wayne . When I google ‘aurelia 1 to 2’:
And if I opened the first link then a Gitbook site opens up that has out of date info about the migration process and lifecycle events. It might be a good idea to get it up to date or remove it to avoid some confusion?
2 Likes