angular-docs-cn/modules
Tobias Bosch f5c8e0989d feat(core): properly support inheritance
## Inheritance Semantics:

Decorators:
1) list the decorators of the class and its parents in the ancestor first order
2) only use the last decorator of each kind (e.g. @Component / ...)

Constructor parameters:
If a class inherits from a parent class and does not declare
a constructor, it inherits the parent class constructor,
and with it the parameter metadata of that parent class.

Lifecycle hooks:
Follow the normal class inheritance model,
i.e. lifecycle hooks of parent classes will be called
even if the method is not overwritten in the child class.

## Example

E.g. the following is a valid use of inheritance and it will
also inherit all metadata:

```
@Directive({selector: 'someDir'})
class ParentDirective {
  constructor(someDep: SomeDep) {}

  ngOnInit() {}
}

class ChildDirective extends ParentDirective {}
```

Closes #11606
Closes #12892
2016-11-28 14:12:12 -08:00
..
@angular feat(core): properly support inheritance 2016-11-28 14:12:12 -08:00
angular1_router refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
benchmarks Keep `console.log` that are not called during compilation. 2016-11-23 15:47:02 -08:00
benchmarks_external refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
e2e_util Keep `console.log` that are not called during compilation. 2016-11-23 15:47:02 -08:00
payload_tests/hello_world/ts style: add missing copyright headers 2016-10-31 14:25:53 -07:00
playground refactor(lint): Don't allow console.log 2016-11-23 15:47:01 -08:00
rollup-test refactor: add license header to JS files & format files (#12081) 2016-10-04 20:39:20 -07:00
empty.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
es6-subset.d.ts chore(typings): restrict Angular to es5+collections+promise 2016-06-27 13:58:59 -07:00
system.d.ts fix(build): Remove duplicate System declarations (#10713) 2016-08-11 19:37:01 -07:00
tsconfig.json feat(language-service): add services to support editors (#12987) 2016-11-22 09:10:23 -08:00
types.d.ts build(examples): upgrade to protractor 4.0.9 (#12803) 2016-11-10 18:13:11 -08:00