Component lifecycle hooks are now interfaces

If you have any custom components in your Angular application that implement class method overrides to any of the component lifecycle hooks in Angular you will need to update your implementation to use the implements keyword instead of extends:

@Component()
class MyComponent extends OnInit {}

In Angular 4, because these lifecycle hooks are defined as interfaces instead of abstract classes you must use the implements keyword:

@Component()
class MyComponent implements OnInit {}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.100.31