2481 Commits

Author SHA1 Message Date
Tobias Bosch
bc69c74be0 fix(tsc-wrapped): still emit version 1 metadata to allow to use new components in old setups 2016-11-28 15:18:57 -08:00
Tobias Bosch
897555ca78 fix(tsc-wrapped): set correct version number 2016-11-28 15:18:56 -08:00
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
Pawel Kozlowski
808275a9d5 feat(core): expose destroy() method on ViewRef 2016-11-28 14:10:42 -08:00
Bowen Ni
4cbf8ccf05 Keep console.log that are not called during compilation. 2016-11-23 15:47:02 -08:00
Bowen Ni
2c02d34c05 refactor(lint): Don't allow console.log
Enable tslint check for `console.log` as a follow-up to
https://github.com/angular/angular/issues/13018
2016-11-23 15:47:01 -08:00
Ward Bell
ec2e6cb2c7 [WIP] docs(quickstart): QuickStart reboot (#2762) 2016-11-21 17:36:16 -08:00
Ward Bell
a7525721c0 Revert "[WIP] docs(quickstart): QuickStart reboot (#2762)"
This reverts commit 8ccc33e6ffacd7a0acdfc49aab2e6fdecf627fa9.
2016-11-21 17:29:00 -08:00
Ward Bell
8ccc33e6ff [WIP] docs(quickstart): QuickStart reboot (#2762) 2016-11-21 17:13:21 -08:00
Ward Bell
66dc8afcec chore(plunker-builder): don't strip import ('app') from index (#2843) 2016-11-20 23:25:09 -08:00
Ward Bell
b3c65a9a93 docs(systemjs.web): auto-bootstrap option that creates its own AppModule and boots it. (#2833)
For specific plunkers, e.g. "QuickStart (reboot edition)" PR #2762, that shouldn't have AppModule or main.ts
Rescinds the automatic bootstrapping and exclusion of `main.ts` in #2786 and #2756
Only autoBootstraps when `window.autoBootstrap === true`.
2016-11-18 20:29:05 -08:00
Tobias Bosch
dddbb1c1cb refactor(tsc-wrapped): collect all exported functions and classes and bump metadata version from 1 to 2
This is needed to resolve symbols without `.d.ts` files.
This bumps the version of the metadata from 1 to 2.
This adds logic into `ng_host.ts` to automatically upgrade
version 1 to version 2 metadata by adding the exported symbols
from the `.d.ts` file.
2016-11-18 10:04:14 -08:00
Tobias Bosch
bccf0e69dc fix(compiler): fix versions of @angular/tsc-wrapped 2016-11-18 10:04:14 -08:00
Alex Eagle
664a6273e1 feature(tsc-wrapped): add option for closure compiler JSDoc annotations 2016-11-18 09:37:40 -08:00
Chuck Jazdzewski
c1a62e2154 feat(tools): allow disabling annotation lowering 2016-11-18 09:37:40 -08:00
Patrice Chalin
f993315931 chore(dart): complete the renaming of "Angular 2" to "Angular" (#2820)
Contributes to #2407

- Dropped the “2” in “Angular 2” and “angular2_*” where appropriate.
- Did a partial sync of `_cache/guide/pipes.jade`
- In quickstart, changed `Try changing the message to "Hello Angular
2!”` to `Try changing the message to "Hello Again Angular!”`.
2016-11-17 14:10:28 -08:00
Peter Bacon Darwin
1f96a93f59 chore(public_api): remove Angular 1 types from upgrade/static API 2016-11-16 09:18:10 -08:00
Dzmitry Shylovich
46d150266b feat(router_link): add skipLocationChange and replaceUrl inputs (#12850) 2016-11-14 18:30:13 -08:00
Tobias Bosch
1b5384ee54 feat(core): expose ViewRef as ChangeDetectorRef
closes #12722

This is helpful when manually dirty checking embedded views.
2016-11-14 17:01:41 -08:00
Tobias Bosch
9f7d32a326 feat(core): add attachView / detachView to ApplicationRef
This feature is useful to allow components / embedded views
to be dirty checked if they are not placed in any `ViewContainer`.

Closes #9293
2016-11-14 17:01:35 -08:00
Matias Niemelä
9de76ebfa5 fix(animations): retain styling when transition destinations are changed (#12208)
Closes #9661
Closes #12208
2016-11-14 16:59:06 -08:00
vsavkin
c2fae72bc6 feat(router): register router with ngprobe 2016-11-14 12:57:05 -08:00
Jesús Rodríguez
43457e9765 chore: add upgrade/static to API reference (#2755) 2016-11-14 21:38:49 +01:00
Joao Dias
77ee27c59e refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
Filipe Silva
12eb19fa3c feat(cb-ts-to-js): add es6 examples
update docshredder to shred .es6
optimized focus gulp task
convert imports and metadate sections
add DI section
add host and query metadata section
add intro
fix capitalization and grammar
2016-11-11 19:44:17 -08:00
Victor Savkin
52be848f94 fix(router): incorrect injector is used when instantiating components loaded lazily (#12817) 2016-11-11 17:12:00 -08:00
João Dias
458ca7112a build(publish): remove unneeded add-license-to-rx (#12734) 2016-11-10 15:56:14 -08:00
Jesús Rodríguez
7619cdf4a4 chore: ability to open a plunker on a specific file (#2778) 2016-11-10 14:47:30 -08:00
Jesús Rodríguez
f92983cc6f docs(ngmodule): fix plunkers (#2786) 2016-11-10 14:44:51 -08:00
Chuck Jazdzewski
69f87ca075 fix(tools): harden colletor against invalid asts (#12793) 2016-11-10 11:58:55 -08:00
vsavkin
73407351e7 feat(router): add support for custom url matchers
Closes #12442
Closes #12772
2016-11-09 16:24:58 -08:00
Victor Savkin
6e35d13fbc feat(router): add a provider making angular1/angular2 integration easier (#12769) 2016-11-09 13:33:33 -08:00
Dzmitry Shylovich
09092ac3c2 fix(forms): getRawValue returns any instead of Object (#12599) 2016-11-08 15:44:36 -08:00
Tobias Bosch
d8f23f4b7f fix(common): NgSwitch - don’t create the default case if another case matches (#12726)
This also simplifies the implementation of `NgSwitch`.

Closes #11297
Closes #9420
2016-11-07 12:22:36 -08:00
Joao Dias
78039b41d6 chore(build): remove unused build/util 2016-11-07 10:32:00 -08:00
Ward Bell
8fafa8a01e docs(plunkers): prepare plunkers for the quickstart reboot (#2759)
* plunker builder removes files and scripts not needed in plunkers (e.g., systemjs.config.js)
* no longer adds placeholder README.md (deemed a distraction)
* tag is now "Angular" instead of "Angular2"
* new plnkr.json "includeSystemConfig" option adds systemjs.config.js back; needed for testing plnkrs.
* incidentally changes comment "Polyfill(s)" to "Polyfills" in all index.html
2016-11-05 12:53:47 -07:00
Ward Bell
74ef87feac docs: systemjs.config.plunker -> systemjs.config.web w/ auto-bootstrap (#2756)
see PR #2756
2016-11-04 21:59:51 -07:00
Jesus Rodriguez
2649647ecb chore: add upgrade/static to API reference 2016-11-05 00:37:47 +01:00
Georgios Kalpakas
469010ea8e feat(UpgradeComponent): add/improve support for lifecycle hooks
Add support for the `$postDigest()` and `$onDestroy()` lifecycle hooks.
Better align the behavior of the `$onChanges()` and `$onInit()` lifecycle hooks
with Angular 1.x:

- Call `$onInit()` before pre-linking.
- Always instantiate the controller before calling `$onChanges()`.
2016-11-04 11:16:28 -07:00
Patrice Chalin
a3466b9cd3 chore: don't shred _boilerplate files nor dart build files (#2747) 2016-11-04 15:06:13 +00:00
Tobias Bosch
0e3d655220 refactor(compiler): remove view factories, use view classes directly 2016-11-02 20:58:48 -07:00
vsavkin
d509ee078b fix(router): reset URL to the stable state when a navigation gets canceled
Closes #10321
2016-11-02 12:25:23 -07:00
Joao Dias
a382d6dd20 style: add missing semicolons 2016-10-31 14:25:53 -07:00
Joao Dias
52bf188b8f style: add missing copyright headers 2016-10-31 14:25:53 -07:00
Joao Dias
a0aecac0e5 chore(lint): replace enforce-copyright-header rule with the native equivalent 2016-10-31 11:27:35 -07:00
Joao Dias
0936ceeab4 chore(npm): clean up clean-shrinkwrap script 2016-10-31 11:26:59 -07:00
Ward Bell
e9d78133e1 docs(testing): revert to jasmine v.2.4.1 (#2697)
Bug in Jasmine v.2.5.x.  Stick with v.2.4.1 (as karma-jasmine does) until the following issue is resolved:
https://github.com/jasmine/jasmine/issues/1231

Unfortunately, there is no `@types/jasmine` for v.2.4 but only for v.2.5.
2016-10-29 23:53:21 -07:00
Jesús Rodríguez
323becee32 chore: remove bootstrap package (#2691) 2016-10-29 10:44:57 -07:00
Joao Dias
0a94845435 chore(lint): replace duplicate-module-import rule with no-duplicate-imports 2016-10-28 15:53:15 -07:00
Thomas Shafer
7c16ef942e feat(core): add the find method to QueryList 2016-10-28 15:34:47 -07:00