mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Deliver web apps with confidence 🚀
## 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
|
||
|---|---|---|
| .github | ||
| docs | ||
| modules | ||
| scripts | ||
| tools | ||
| .bowerrc | ||
| .clang-format | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .nvmrc | ||
| .travis.yml | ||
| bower.json | ||
| browser-providers.conf.js | ||
| build.sh | ||
| CHANGELOG.md | ||
| circle.yml | ||
| COMMITTER.md | ||
| CONTRIBUTING.md | ||
| DEVELOPER.md | ||
| gulpfile.js | ||
| karma-js.conf.js | ||
| LICENSE | ||
| NAMING.md | ||
| npm-shrinkwrap.clean.json | ||
| npm-shrinkwrap.json | ||
| npm-shrinkwrap.readme.md | ||
| package.json | ||
| protractor-e2e.conf.js | ||
| protractor-examples-e2e.conf.js | ||
| protractor-perf.conf.js | ||
| publish-packages.sh | ||
| README.md | ||
| SAVED_REPLIES.md | ||
| shims_for_IE.js | ||
| test-main.js | ||
| test.sh | ||
| TOOLS.md | ||
| TRIAGE_AND_LABELS.md | ||
| tslint.json | ||
Safari (7+), iOS (7+), Edge (14) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications. This is the repository for Angular 2 Typescript/JavaScript (JS).
Angular2 for Dart can be found at dart-lang/angular2.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.