X Tutup
Skip to content

feat(router): lifecycle hooks #2640

@btford

Description

@btford

Implement lifecycle hooks: CanActivate, CanReuse, CanDeactivate, Activate, Reuse, and Deactivate.

For ES5:

function Cmp() {
  // hook inferred by name
  this.$canActivate = function () { ... };
}

For TS:

class Cmp {
  // hook inferred by decorator
  @CanActivate()
  foo():Promise<boolean> { ... }
}

For Dart:

class Cmp implements CanActivateLifecycle {
  // hook inferred by interface
  canActivate() { ... }
}

Metadata

Metadata

Assignees

Labels

effort2: daysfeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup