You can see the view lifecycle here: http://durandaljs.com/documentation/Hooking-Lifecycle-Callbacks
In durandal 2.0 there is no more viewAttached
, it has been renamed to attached
To Yasser - activate is happening first before viewmodel is attached to it's corresponding view so you can't access any DOM elements, attached comes after viewmodel and view are connected and you can access DOM elements