# Aurelia 2 - Lifecycle methods not working? (SOLVED)

**URL:** <https://discourse.aurelia.io/t/aurelia-2-lifecycle-methods-not-working-solved/3680>\
**Category:** Help Requests\
**Created:** [July 27, 2020, 12:14am UTC](https://discourse.aurelia.io/t/aurelia-2-lifecycle-methods-not-working-solved/3680 "2020-07-27T00:14:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/andy/32/1880_2.png) [@Andy](https://discourse.aurelia.io/u/Andy)\
**Post date:** [July 27, 2020, 12:14am UTC](https://discourse.aurelia.io/t/aurelia-2-lifecycle-methods-not-working-solved/3680/1 "2020-07-27T00:14:19Z")

</div>

Hello!

This doesn’t work for me:

```
`

```

export class MyApp {

```
public message = 'Hello World!'

constructor() {

}

attached() {
  
    setTimeout(() => this.message = 'Changed', 4000)
}

```

}`

But the following DOES work:

`  
export class MyApp {

```
public message = 'Hello World!'

constructor() {

    setTimeout(() => this.message = 'Changed', 4000)
}

```

}`

For some reason, the attached/bind/etc lifecycle methods are not working for me in basic Aurelia 2 demo.

---

<div class="post-metadata">

**Author:** ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)\
**Post date:** [July 27, 2020, 1:57am UTC](https://discourse.aurelia.io/t/aurelia-2-lifecycle-methods-not-working-solved/3680/2 "2020-07-27T01:57:18Z")

</div>

That was a breaking change on the lifecycle method names. Try `afterAttach`.

> **[Building Components](https://docs.aurelia.io/getting-started/components#the-component-lifecycle)**
>
> The basics of building components with Aurelia.

---

<div class="post-metadata">

**Author:** ![Andy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/andy/32/1880_2.png) [@Andy](https://discourse.aurelia.io/u/Andy)\
**Post date:** [July 27, 2020, 3:06am UTC](https://discourse.aurelia.io/t/aurelia-2-lifecycle-methods-not-working-solved/3680/3 "2020-07-27T03:06:30Z")

</div>

HOly smokes! Didn’t even know that site existed, not linked from official guide.

Thank you : )

---

<div class="post-metadata">

**Author:** ![Bart](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bart/32/1878_2.png) [@Bart](https://discourse.aurelia.io/u/Bart)\
**Post date:** [July 27, 2020, 9:46am UTC](https://discourse.aurelia.io/t/aurelia-2-lifecycle-methods-not-working-solved/3680/4 "2020-07-27T09:46:47Z")

</div>

🙂 I was confused about this as well.

The “official documentation” ([https://aurelia.io/docs](https://aurelia.io/docs)) contains the v1 documentation.

As you may already know, Aurelia 2 is still in an early development phase. I guess that’s why the documentation for the new v2 release ([https://docs.aurelia.io](https://docs.aurelia.io)) is indeed not (yet) accessible from Aurelia’s main site.

The Aurelia 2 documentation is also available in its GitHub repository ([https://github.com/aurelia/aurelia](https://github.com/aurelia/aurelia)). I assume that the new documentation site is regularly (or even automatically) built from the GitHub repo.
