This repository was archived by the owner on Feb 26, 2024. It is now read-only.
static life-cylce hooks #215
Open
Description
When I add an life-cycle hook, I need to add it to the prototype in stead of using a static property.
Now we need to do WelcomeController.prototype.canActivate = function () {}
in stead of WelcomeController.canActivate = function () {}
.
The second source sample feels more natural to me. As controllers in this case will most often be a single instance in the app, there is in my opinion no added value by adding it to the prototype.