Commit Graph

4654 Commits

Author SHA1 Message Date
Chuck Jazdzewski 481c9b3258 refactor(compiler): allows synchronous retrieving of metadata (#12908)
Allows non-normalized metadata to be retrieved synchronously.

Related to #7482
2016-11-16 10:22:11 -08:00
Tobias Bosch 8b2dfb2eca fix(core): support `ngTemplateOutlet` in production mode (#12921)
Fixes #12911
2016-11-16 10:00:18 -08:00
Peter Bacon Darwin 824ea8406c docs(upgrade/static): improve API docs with examples
Closes #12717
2016-11-16 09:18:17 -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
Peter Bacon Darwin 009d545787 chore(examples): add upgrade/static example 2016-11-16 09:18:10 -08:00
Peter Bacon Darwin 53c25210a6 chore(examples): support upgrade/static examples 2016-11-16 09:18:10 -08:00
Victor Savkin 927aa69726 fix(router): add a banner file for the router (#12919) 2016-11-16 09:17:19 -08:00
Dzmitry Shylovich ce89039036 fix(platform_browser): fix disableDebugTools() (#12918) 2016-11-16 09:16:40 -08:00
Sammy Jelin 42198cd7d5 fix(ngUpgrade): make AoT ngUpgrade work with the testability API and resumeBootstrap() (#12910) 2016-11-16 01:04:56 -08:00
Victor Savkin 773b31de8f fix(router): should not create a route state if navigation is canceled (#12868)
Closes #12776
2016-11-15 19:00:20 -08:00
Dzmitry Shylovich f79b320fc4 refactor(forms): remove facade (#12558) 2016-11-15 18:48:34 -08:00
vsavkin 6a212fd561 fix(router): removes a peer dependency from router to upgrade 2016-11-15 18:37:08 -08:00
Matias Niemelä be010a292a fix(animations): only pass in same typed players as previous players into web-animations (#12907)
Closes #12907
2016-11-15 17:47:21 -08:00
Dzmitry Shylovich 7c36e7f956 chore(router): remove @angular/upgrade peer dep (#12896) 2016-11-15 14:00:11 -08:00
João Dias 13ba2f90b9 refactor(http): remove all facade methods from http module (#12870) 2016-11-15 09:19:14 -08:00
Alex Eagle 75277cd94b fix(tsickle): support ctorParams in function closure (#12876)
See https://github.com/angular/tsickle/issues/261 for context.
2016-11-15 09:19:00 -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
Dzmitry Shylovich 46023e4792 fix(select): allow for null values in HTML select options bound with ngValue
closes #12829
2016-11-14 16:47:14 -08:00
Craig Hutchison b55aaf094f fix: allow for null values in HTML select options bound with ngValue
This corrects the case of <option [ngValue]="null"> binding a string like "{0: null}" to the model instead of an actual null object.

Closes #10349
2016-11-14 16:47:09 -08:00
Craig Hutchison d90b622fa4 fix: allow for null values in HTML select options bound with ngValue
This corrects the case of <option [ngValue]="null"> binding a string like "{0: null}" to the model instead of an actual null object.

Closes #10349
2016-11-14 16:47:09 -08:00
Victor Berchet 79e2bb9291 refactor(core): remove dead code (#12871) 2016-11-14 16:44:25 -08:00
Victor Berchet efbbefd353 fix(platform-browser): enable AOT
closes #12783
2016-11-14 12:57:11 -08:00
vsavkin c2fae72bc6 feat(router): register router with ngprobe 2016-11-14 12:57:05 -08:00
Victor Berchet 7908679c4b fix(compiler): assert xliff messages have translations
fixes #12815
closes #12604
2016-11-14 12:55:56 -08:00
Victor Berchet 9ed9ff40b3 test(compiler): improve xliff tests 2016-11-14 12:55:48 -08:00
Victor Berchet 2f14415836 fix(compiler): updates hash algo for xmb/xtb files 2016-11-14 12:55:48 -08:00
Victor Berchet 76e4911e8b fix(core): fix placeholders handling in i18n.
Prior to this commit, translations were built in the serializers. This
could not work as a single translation can be used for different source
messages having different placeholder content.

Serializers do not try to replace the placeholders any more.
Placeholders are replaced by the translation bundle and the source
message is given as parameter so that the content of the placeholders is
taken into account.

Also XMB ids are now independent of the expression which is replaced by
a placeholder in the extracted file.
fixes #12512
2016-11-14 12:55:48 -08:00
Victor Berchet ed5e98d0df fix(core): misc i18n fixes 2016-11-14 12:55:48 -08:00
Victor Berchet 146af1fed9 refactor(core): simplify i18n serializers code 2016-11-14 12:55:48 -08:00
Victor Berchet c60ba7a72f refactor(core): remove ListWrapper from i18n 2016-11-14 12:55:48 -08:00
Victor Berchet 05beffe0d0 test(core): fix a typo in the i18n integration spec 2016-11-14 12:55:48 -08:00
Victor Berchet 08c038ebd9 fix(core): xmb serializer uses decimal messaged IDs
fixes #12511
2016-11-14 12:55:48 -08:00
Victor Berchet 582550a90d feat(core): implements a decimal fingerprint for i18n 2016-11-14 12:55:48 -08:00
Dzmitry Shylovich 1d53a870dd fix(http): return request url if it cannot be retrieved from response
closes #12837
2016-11-14 12:54:43 -08:00
Dzmitry Shylovich a0c58a6b5c fix(http): correctly handle response body for 204 status code
closes #12830
fixes #12393
2016-11-14 12:36:22 -08:00
Dzmitry Shylovich d3eff6c483 refactor(xhr_backend): remove facade 2016-11-14 12:36:16 -08:00
Joao Dias 77ee27c59e refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
Ferhat 73593d4bf3 perf(platform-browser): cache plugin resolution in the EventManager
closes #12824
2016-11-11 17:19:47 -08:00
Chuck Jazdzewski a965d11cce fix(compiler): generate safe access strictNullChecks compatible code (#12800)
fixes #12795
2016-11-11 17:12: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
Tobias Bosch 69dfcf7385 docs(forms): add inline docs why `ngModel` runs a 2nd change detection run (#12821)
Related to #11895
2016-11-11 15:24:11 -08:00
Dzmitry Shylovich 785b7b640e fix(router): Route.isActive also compares query params (#12321) 2016-11-11 13:23:47 -08:00
vsavkin e5a753e111 fix(router): router should not swallow "unhandled" errors
closes #12802
2016-11-11 13:22:19 -08:00
Dzmitry Shylovich 768cddbe62 fix(events): provide the ability to register global hammer.js events
closes #12797
2016-11-11 11:15:49 -08:00
Dzmitry Shylovich 92f244aa26 refactor(events): remove facade and clean up 2016-11-11 11:15:43 -08:00
Michael Seemann 2a4bf9a0df fix(router): avoid router initialization for non root components
closes #12338
closes #12814
2016-11-11 11:15:17 -08:00
Victor Berchet 45ddd6ba78 cleanup(forms): remove facade (#12804) 2016-11-11 10:47:34 -08:00
Dzmitry Shylovich 7886561997 fix(router): check if windows.console exists before using it (#12348) 2016-11-11 10:46:53 -08:00
André Werlang 752edca81b test(core): ngOnDestroy called before output events are detached (#9946)
closes #6984
closes #5436
2016-11-11 10:27:32 -08:00
Victor Berchet 1bd858fb43 build(examples): upgrade to protractor 4.0.9 (#12803)
closes #12798
2016-11-10 18:13:11 -08:00
Tobias Bosch fcb4e66493 refactor(compiler): introduce summaries for metadata (#12799)
This does not yet introduce loading / serialization of summaries.

Part of #12787
2016-11-10 16:27:53 -08:00
Victor Berchet ef881475e9 fix(forms): check if registerOnValidatorChange exists on validator before trying to invoke it (#12801)
closes #12593
2016-11-10 16:20:59 -08:00
Bruno da Silva joão 2aba8b0ff2 fix(common): no TZ Offset added by DatePipe for dates without time (#12380) 2016-11-10 14:57:04 -08:00
Dzmitry Shylovich 77dc1ab675 fix(router): throw an error when encounter undefined route (#12389) 2016-11-10 14:55:10 -08:00
Dzmitry Shylovich 3052fb234f fix(router): ignore null or undefined query parameters (#12333) 2016-11-10 14:41:19 -08:00
Tobias Bosch 79383ce150 refactor(compiler): never create CompileDirectiveMetadata with not loaded resources (#12788)
Part of #12787
2016-11-10 14:07:30 -08:00
Chuck Jazdzewski c3c0e2e2a2 refactor(compiler): add `span` to `TemplateBinding` (#12792)
fix(compiler): corrected error location for implicit templates expressions
2016-11-10 13:15:09 -08:00
Joao Dias 44a142fc02 chore(playground): use base64-js from npm
closes #12471
2016-11-10 12:08:04 -08:00
Joao Dias 3d9d839c6c refactor(playground): make playground great again 2016-11-10 12:07:51 -08:00
Matias Niemelä 19e869e7c9 fix(animations): ensure animations work with web-workers (#12656) 2016-11-10 11:53:50 -08:00
Chuck Jazdzewski 7cab30f85d refactor(compiler-cli): add position data to static reflector errors (#12782) 2016-11-09 16:29:22 -08:00
vsavkin 73407351e7 feat(router): add support for custom url matchers
Closes #12442
Closes #12772
2016-11-09 16:24:58 -08:00
vsavkin 2c110931f8 fix(router): do not require the creation of empty-path routes when no url left
Closes #12133
2016-11-09 16:24:49 -08:00
Victor Berchet 2ced2a8a5a refactor(compiler): misc updates (#12773) 2016-11-09 16:23:41 -08:00
Pawel Kozlowski 634b3bb88b feat(core): map 'for' attribute to 'htmlFor' property (#10546)
This improves ergonomics a bit by allowing people to write:
`<label [for]="ctxProp"></label>`.
This is similar to the existing class -> className mapping.

Closes #7516
2016-11-09 15:21:27 -08:00
Chuck Jazdzewski 4595a61aeb refactor(compiler-cli): refactor imports in codegen to enable rollup (#12781) 2016-11-09 15:17:24 -08:00
Matias Niemelä f80a157b65 fix(animations): ensure web-animations are caught within the Angular zone
Closes #11881
Closes #11712
Closes #12355
Closes #11881
Closes #12546
Closes #12707
Closes #12774
2016-11-09 15:16:34 -08:00
Victor Savkin 6e35d13fbc feat(router): add a provider making angular1/angular2 integration easier (#12769) 2016-11-09 13:33:33 -08:00
Matias Niemelä fe35bc34f6 fix(animations): allow animations to be destroyed manually (#12719)
Closes #12456
Closes #12719
2016-11-08 16:21:28 -08:00
Tobias Bosch ad3bf6c54f fix(core): apply host attributes to root elements (#12761)
Fixes #12744
2016-11-08 15:46:55 -08:00
Matias Niemelä a0e9fde653 fix(animations): always normalize style properties and values during compilation (#12755)
Closes #11582
Closes #12481
Closes #12755
2016-11-08 15:45:30 -08:00
Dzmitry Shylovich 3dc61779f0 fix(DatePipe): handle empty string (#12374) 2016-11-08 15:45:12 -08:00
Dzmitry Shylovich 09092ac3c2 fix(forms): getRawValue returns any instead of Object (#12599) 2016-11-08 15:44:36 -08:00
Victor Berchet 778e6ad3b4 refactor: cleanup ICU message syntax 2016-11-08 15:44:18 -08:00
Victor Berchet 55dc0e4a5f fix(compiler): use the other case by default in ICU messages 2016-11-08 15:44:18 -08:00
Victor Berchet 4708b248d5 fix(common): I18nSelectPipe selects other case on default 2016-11-08 15:44:18 -08:00
Victor Berchet 7694f974af refactor: remove some facades (#12731) 2016-11-08 15:43:24 -08:00
Victor Berchet acbf1d859c fix(core): fix pseudo-selector shimming (#12754)
fixes #12730
fixes #12354
2016-11-07 13:56:04 -08:00
Pawel Kozlowski f3793b5953 fix(NgClass): throw a descriptive error when CSS class is not a string (#12662)
Fixes #12586
2016-11-07 12:23:31 -08:00
Pawel Kozlowski 22c021c57f fix(compiler): support more than 9 interpolations (#12710)
Fixes #10253
2016-11-07 12:23:03 -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
liufc 89fd54e8e3 docs(url_tree):fix typo(UrlSegment path property's comment part -> path) (#12728) 2016-11-07 10:27:47 -08:00
Alex Eagle 77cbf7f2bb fix(closure): suppress two more closure compiler checks in codegen (#12698) 2016-11-04 15:18:05 -07:00
Matias Niemelä 383f23b578 fix(animations): always trigger animations after the change detection check (#12713)
This patch ensures that animations are run outside of change detection
thus allowing for start and done callbacks to modify application data
without causing a cycle loop.

Closes #12713
2016-11-04 15:15:27 -07:00
Victor Berchet 2a3f4d7b17 refactor: kill MapWrapper 2016-11-04 13:27:38 -07:00
Victor Berchet ec92f4b198 refactor: remove `keys()` and `values()` from MapWrapper 2016-11-04 13:27:38 -07:00
Alex Rickabaugh 121e5080aa fix(http): preserve header case when copying headers (#12697) 2016-11-04 13:26:38 -07:00
Georgios Kalpakas fe1d0e29c5 feat(UpgradeComponent): add support for `require`
This commit also adds/improves/fixes some `UpgradeComponent` tests.
2016-11-04 11:16:28 -07: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
Pawel Kozlowski f0cdb428f5 fix(compiler): don't convert undefined to null literals (#11503)
Fixes #11493
2016-11-04 10:55:21 -07:00
Tobias Bosch 051d74802a fix(core): ensure that component views that have no bindings recurse into nested components / view containers. 2016-11-04 10:50:27 -07:00
Tobias Bosch f2bbef3e33 fix(core): allow to query content of templates that are stamped out at a different place
Previously, if a `TemplateRef` was created in a `ViewContainerRef`
at a different place, the content was not query able at all.

With this change, the content of the template can be queried
as if it was stamped out at the declaration place of the template.

E.g. in the following example, the `QueryList<ChildCmp>` will
be filled once the button is clicked.

```
@Component({
  selector: ‘my-comp’,
  template: ‘<button #vc (click)=“createView()”></button>’
})
class MyComp {
  @ContentChildren(ChildCmp)
  children: QueryList<ChildCmp>;

  @ContentChildren(TemplateRef)
  template: TemplateRef;

  @ViewChild(‘vc’, {read: ViewContainerRef})
  vc: ViewContainerRef;

  createView() {
    this.vc.createEmbeddedView(this.template);
  }
}

@Component({
  template: `
<my-comp>
  <template><child-cmp></child-cmp></template>
</my-comp>
`
})
class App {}
```

Closes #12283
Closes #12094
2016-11-04 10:50:27 -07:00
Tobias Bosch e3687706c7 refactor(compiler): minor cleanup 2016-11-03 16:29:51 -07:00
Tobias Bosch 648ce5981b perf(core): don’t use `DomAdapter` nor zone for regular events 2016-11-03 16:29:51 -07:00
Tobias Bosch 9c23884da4 perf(compiler): introduce direct rendering
This allows to attach / detach embedded views and projected nodes
in a faster way.
2016-11-03 16:29:51 -07:00
Tobias Bosch d708a8859c perf(platform-browser): don’t use `DomAdapter` any more
But use the DOM apis directly.
This also creates a separate `ServerRenderer` implementation
for `platform-server` as it previously reused the `BrowserRenderer`.
2016-11-03 16:29:51 -07:00
Victor Savkin 9ddf9b3d3d fix(router): advance a route only after its children have been deactivated (#12676)
Closes #11715
2016-11-03 16:26:10 -07:00
gaohailang 69f006cd89 docs(change_detection): fix typo(ChangeDetectorStatus enum comment CheckedOnce -> CheckOnce) (#12683) 2016-11-03 11:23:20 -07:00
Trotyl Yu 4aaae3eada docs(common): fix a typo in ngStyle API docs 2016-11-03 10:27:05 -07:00
André Werlang 2e78b76fcf fix(router): resolve guard observables on the first emit (#10412) 2016-11-02 21:56:04 -07:00
danielcrisp b2cf379d1c fix(enableDebugTools): create AngularTools by merging into context.ng (#12003)
When using `enableDebugTools` the tools are merged into `context.ng` to prevent `ng.probe` and `ng.coreTokens` from being clobbered.

Fixes #12002
2016-11-02 21:55:49 -07:00
CorvusCorrax e25baa08b3 fix(router): correctly export concatMap operator in es5 (#12430) 2016-11-02 21:55:02 -07:00
Alex Eagle 7103754178 fix(closure): suppress closure compiler suspiciousCode check in codegen (#12666) 2016-11-02 21:11:30 -07:00
Tobias Bosch 1a069e8372 refactor(compiler): cleanups 2016-11-02 20:58:48 -07:00
Tobias Bosch 0fc11a43f1 perf(core): use `array.push` / `array.pop` instead of `splice` if possible 2016-11-02 20:58:48 -07:00
Tobias Bosch 0e3d655220 refactor(compiler): remove view factories, use view classes directly 2016-11-02 20:58:48 -07:00
Tobias Bosch 7c5cc9bc41 refactor(compiler): initialize `RenderComponentType` eagerly
This moves the usage of `APP_ID` into the `DomRenderer`.
2016-11-02 20:58:48 -07:00
Tobias Bosch 5f1dddc5d0 refactor(compiler): cleanups 2016-11-02 17:06:27 -07:00
Tobias Bosch 20a4f9923f refactor(compiler): remove `view.parentInjector` 2016-11-02 17:06:27 -07:00
Tobias Bosch e7c00be19d refactor(compiler): rename `AppElement` into `ViewContainer` 2016-11-02 17:06:27 -07:00
Tobias Bosch 74ede9aa9b refactor(core): don’t store view factory in `TemplateRef`
Instead, generate `createEmbeddedView`.
2016-11-02 17:06:27 -07:00
Tobias Bosch d1035da85c refactor(compiler): don’t use `AppElement`s for creating component views 2016-11-02 17:06:27 -07:00
Tobias Bosch 13533d2a30 refactor(compiler): remove `AppElement.initComponent` 2016-11-02 17:06:27 -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
vsavkin 8e221b826f fix(router): routerLink should not prevent default on non-link elements 2016-11-02 12:25:23 -07:00
vsavkin 830a780cb3 fix(router): CanDeactivate receives a wrong component
Closes #12592
2016-11-02 12:25:23 -07:00
Tobias Bosch 6fda97287e fix(compiler): support multiple components in a view container 2016-11-01 14:21:40 -07:00
Tobias Bosch 234c5599f1 refactor(compiler): remove unused constructor query support 2016-11-01 11:29:15 -07:00
Tobias Bosch f6710fefeb refactor(compiler): make `view.disposable` array null if empty 2016-11-01 11:29:15 -07:00
Tobias Bosch bda1909ede refactor(compiler): remove `view.rootNodes` and `view.projectableNodes`
They are replaced by generated visitor functions `view.visitRootNodes` / `view.visitProjectableNodes`.
2016-11-01 11:29:15 -07:00
Tobias Bosch b3e3cd3add refactor(compiler): inline `view.contentChildren` 2016-11-01 11:29:14 -07:00
Tobias Bosch e5fdf4c70a refactor(compiler): inline view.viewChildren in generated code 2016-11-01 11:29:14 -07:00
Tobias Bosch 97471d74b6 refactor(compiler): remove unused `subscriptions` in view 2016-11-01 11:29:14 -07:00
Austin Miller 1de04b23b1 fix(router): call data observers when the path changes 2016-11-01 11:28:43 -07:00
Tobias Bosch a178bc6c83 fix(compiler): dedupe NgModule declarations, …
This is important so that we don’t generate things multiple times.
2016-10-31 14:43:50 -07:00
Tobias Bosch 642c1db9ef fix(compiler): Don’t throw on empty property bindings
Closes #12583
2016-10-31 14:43:50 -07:00
Joao Dias 579deeb9c5 style(platform-browser): clean up hammer gestures 2016-10-31 14:43:05 -07:00
Joao Dias bad58824a0 refactor(playground): update gestures playground to use latest hammer.js 2016-10-31 14:43:04 -07:00
Joao Dias 5494169fb4 style: make internal members accessibility explicit 2016-10-31 14:25:53 -07:00
Joao Dias 5a3d7a62a2 style: merge imports from the same modules 2016-10-31 14:25:53 -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
Zaven Muradyan e9fd8645ed fix(core): improve error when multiple components match the same element
Closes #7067
2016-10-31 11:28:03 -07:00
Joao Dias e0ad413a8e style(tests): clean up testing_public_spec (#11452) 2016-10-31 11:26:38 -07:00
Michael George Attard 3045d02b9a docs(pipes): minor fix and improvements 2016-10-31 12:39:21 +01:00
Joao Dias e86573bac8 chore(lint): replace gulp check-task with tslint no-jasmine-focus rule
fixes #11800
2016-10-28 15:53:15 -07:00
Victor Berchet 7b8dae19af refactor(facade): cleanup Intl facade 2016-10-28 15:52:52 -07:00
Thomas Shafer 7c16ef942e feat(core): add the find method to QueryList 2016-10-28 15:34:47 -07:00
Thomas Shafer a318b57257 refactor(core): removed extraneous interface from QueryList test 2016-10-28 15:34:47 -07:00
vsavkin fe47e6b783 fix(router): rerun resolvers when url changes
Closes #12603
2016-10-28 15:17:00 -07:00
vsavkin 091c390032 fix(router): run navigations serialy
Closes #11754
2016-10-28 14:56:08 -07:00
Tobias Bosch e391cacdf9 fix(compiler): don’t double bind functions
This fixes a performance regressions introduced by 178fb79b5c.

Also makes properties in the directive wrapper private
so that closure compiler can minify them better.
2016-10-28 11:17:12 -07:00
Tobias Bosch 32feb8a532 refactor(compiler): generate host listeners in DirectiveWrappers
Part of #11683
2016-10-27 16:09:01 -07:00
Victor Berchet d520fae70e refactor(upgrade): spec cleanup 2016-10-27 12:12:55 -07:00
Bruno Trigueiro fa93fd672e fix(upgrade): silent bootstrap failures
fixes #12062
2016-10-27 12:12:54 -07:00
Alex Eagle a26dd28bdb refactor(upgrade): re-export the new static upgrade APIs on new entry
Add upgrade-static.umd.js bundles
This allows depending on it without getting a transitive dependency on compiler.

BREAKING CHANGE:

Four newly added APIs in 2.2.0-beta:
downgradeComponent, downgradeInjectable, UpgradeComponent, and UpgradeModule
are no longer exported by @angular/upgrade.
Import these from @angular/upgrade/static instead.
2016-10-26 15:14:22 -07:00
Jan Kuri 7742ec00e7 fix: remove double exports of template_ast 2016-10-26 15:14:00 -07:00
Justin James 2b5c983c13 docs(reset): change semi-colon to colon in code example
The first code example for the reset function was invalid as it has a semi-colon instead of a colon for the last property in the json object.  Change the semi-colon to a colon.

Closes https://github.com/angular/angular/issues/12531
2016-10-26 14:56:57 -07:00
Victor Berchet ef153649b3 fix(compiler-cli): fix types 2016-10-26 14:56:27 -07:00
Dzmitry Shylovich d321b0ebf5 fix(selectors): use Maps instead of objects 2016-10-26 14:55:59 -07:00
Barna Tóth b4265e0685 fix(xsrf): overwrite already set xsrf header 2016-10-26 14:55:24 -07:00
Tobias Bosch 178fb79b5c refactor(compiler): move host properties into DirectiveWrapper
Part of #11683
2016-10-26 14:32:24 -07:00
Tobias Bosch 5a7a58b1e0 refactor(compiler): make arguments in `InlineArray` optional. 2016-10-26 14:32:24 -07:00
Tobias Bosch f66ac821a2 refactor(compiler): extract `createCheckBindingStmt` into `compiler_util`
Part of #11683
2016-10-26 14:32:24 -07:00
Tobias Bosch fe299f4dfc refactor(compiler): minor cleanups 2016-10-26 14:32:24 -07:00
Tobias Bosch 4cac650675 refactor(compiler): extract expression evaluation and writing to renderer from view_compiler
This is needed to that `DirectiveWrapper`s can also use them later on.

Part of #11683
2016-10-26 14:32:24 -07:00
Tobias Bosch cb7643ccea refactor(compiler): introduce `ClassBuilder`.
Part of #11683
2016-10-26 14:32:23 -07:00
Tobias Bosch faa3478514 refactor(compiler): set element attributes via one call
This makes the cost of using directives that have host attributes
smaller.

Part of #11683
2016-10-26 14:32:23 -07:00
Tobias Bosch bc3f4bc816 refactor(compiler): extract BindingParser
Needed so that we can parse directive host bindings independent of templates.

Part of #11683
2016-10-26 14:32:23 -07:00
Jeremy Elbourn c9f58cf78c feat(router): export routerLinkActive w/ isActive property 2016-10-26 14:08:22 -07:00
vsavkin 6ccbfd41dd fix(router): preserve resolve data
Closes #12306
2016-10-26 13:53:00 -07:00
vsavkin 7d2554baa1 tests(router): add a test showing how to handle resovle errors 2016-10-26 13:52:59 -07:00
vsavkin 52a853e257 fix(router): change router not to deactivate aux routes when navigating from a componentless routes 2016-10-26 13:52:59 -07:00
vsavkin 8f2fa0f766 fix(router): disallow component routes with named outlets
Closes #11208, #11082
2016-10-26 13:52:59 -07:00
vsavkin fc60fa790c fix(router): add a test to make sure canDeactivate guards are called for aux routes
Closes #11345
2016-10-26 13:52:58 -07:00
vsavkin b74185369f fix(router): canDeactivate guards are not triggered for componentless routes
Closes #12375
2016-10-26 13:52:58 -07:00
Victor Berchet 7221632228 fix(CompilerCli): assert that all pipes and directives are declared by a module 2016-10-25 18:17:18 -07:00
michaelgeorgeattard 02f1222a8d docs(common): minor corrections/improvements for NgClass (#12327) 2016-10-25 00:12:09 +02:00
Uri Shaked c27ce7318f doc(compiler-cli): align example with style guide (#12414)
See The Angular Style Guide, [Section 2.2 - Separate File Names with Dots and Dashes](https://angular.io/docs/ts/latest/guide/style-guide.html#!#02-02)
2016-10-25 00:10:03 +02:00
Victor Berchet a838aba756 fix(compiler): walk third party modules (#12453)
fixes #11889
fixes #12428
2016-10-24 22:28:23 +02:00
Martin Probst bfc97ff2cd refactor(i18n): extract Extractor from extract_i18n (#12417)
I put an extractor into your extract so you can extract while you
extract.

This allows integrators to call Extractor as a library. Also refactors
Extractor a bit so that callers need fewer arguments or arguments that
are at the right semantic level.

The refactoring causes no function change.
2016-10-21 15:17:57 -07:00
Victor Berchet 57051f01ce refactor: remove most facades (#12399) 2016-10-21 15:14:44 -07:00
Tobias Bosch 867494a060 fix(compiler): don't access view local variables nor pipes in host expressions (#12396)
Fixes #12004
Closes #12071
2016-10-20 15:24:58 -07:00
Daniel Leib da5fc696bb fix(router): do not update primary route if only secondary outlet is given (#11797) 2016-10-20 10:59:08 -07:00
Victor Savkin b44b6ef8f5 fix(router): module loader should start compiling modules when stubbedModules are set (#11742) 2016-10-20 10:58:53 -07:00
vsavkin 0f21a5823b cleanup(router): add a test verifying than NavigationEnd is not emitted after NavigationCancel 2016-10-20 10:56:12 -07:00
vsavkin 5ae6915600 fix(router): fix lazy loading triggered by redirects from wildcard routes
Closes #12183
2016-10-20 10:56:12 -07:00
Victor Savkin 8b9ab44eee feat(router): add support for ng1/ng2 migration (#12160) 2016-10-20 10:44:44 -07:00
Tobias Bosch b0a03fcab3 refactor(compiler): introduce directive wrappers to generate less code
- for now only wraps the `@Input` properties and calls
  to `ngOnInit`, `ngDoCheck` and `ngOnChanges` of directives.
- also groups eval sources by NgModule.

Part of #11683
2016-10-20 10:41:43 -07:00
Tobias Bosch c951822c35 refactor(compiler): don’t use the `OfflineCompiler` in extract_i18n 2016-10-20 10:41:43 -07:00
Tobias Bosch acda82c1ed refactor(compiler): remove private exports
All of `@angular/compiler` is private, so we can export
everything we need directly.
2016-10-20 10:41:43 -07:00
Peter Bacon Darwin d6791ff0e0 feat(ngUpgrade): add support for AoT compiled upgrade applications
This commit introduces a new API to the ngUpgrade module, which is compatible
with AoT compilation. Primarily, it removes the dependency on reflection
over the Angular 2 metadata by introducing an API where this information
is explicitly defined, in the source code, in a way that is not lost through
AoT compilation.

This commit is a collaboration between @mhevery (who provided the original
design of the API); @gkalpak & @petebacondarwin (who implemented the
API and migrated the specs from the original ngUpgrade tests) and @alexeagle
(who provided input and review).

This commit is an starting point, there is still work to be done:

* add more documentation
* validate the API via internal projects
* align the ngUpgrade compilation of A1 directives closer to the real A1
  compiler
* add more unit tests
* consider support for async `templateUrl` A1 upgraded components

Closes #12239
2016-10-19 15:27:49 -07:00
Victor Berchet 76dd026447 refactor: remove some facades (#12335) 2016-10-19 13:42:39 -07:00
shaul almog 0e9503b500 feat(forms) range values need to be numbers instead of strings (#11792) 2016-10-19 10:12:13 -07:00
Andrei Tserakhau f77ab6a2d2 feat(datePipe): support narrow forms for month and weekdays (#12297)
Closes #12294
2016-10-19 10:05:13 -07:00
Pawel Kozlowski 97bc97153b feat(forms): add ng-pending CSS class during async validation (#11243)
Closes #10336
2016-10-19 09:56:31 -07:00
Dzmitry Shylovich 445e5922ec feat(forms): make 'parent' a public property of 'AbstractControl' (#11855) 2016-10-19 09:55:50 -07:00
Florian Kinder b9fc090143 feat(forms): Added emitEvent to AbstractControl methods (#11949)
* feat(forms): Added emitEvent to AbstractControl methods

* style(forms): unified named parameter
2016-10-19 09:54:54 -07:00
Cédric Exbrayat 592f40aa9c feat(forms): add hasError and getError to AbstractControlDirective (#11985)
Allows cleaner expressions in template-driven forms.

Before:

    <label>Username</label><input name="username" ngModel required #username="ngModel">
    <div *ngIf="username.dirty && username.control.hasError('required')">Username is required</div>

After:

    <label>Username</label><input name="username" ngModel required #username="ngModel">
    <div *ngIf="username.dirty && username.hasError('required')">Username is required</div>

Fixes #7255
2016-10-19 09:49:02 -07:00
Tobias Bosch 24facdea2d feat(benchmark): add large form benchmark
This benchmark tracks the generated file size for large forms
as well as the time to create and destroy many form fields.
2016-10-19 09:39:16 -07:00
Tobias Bosch aa2d3372a5 fix(benchmarks): fix method name in targetable spec 2016-10-19 09:39:16 -07:00
Dzmitry Shylovich bf60418fdc feat(forms): Validator.pattern accepts a RegExp (#12323) 2016-10-19 09:37:54 -07:00
Alex Eagle cca4a5c519 fix(compiler): don't redeclare a var in the same scope (#12386)
This is not allowed by Closure Compiler.
2016-10-18 20:28:30 -07:00
Matias Niemelä 6e5f8b59b3 fix(animations): generate aot code for animation trigger output events (#12291)
Closes #11707
Closes #12291
2016-10-18 17:16:51 -07:00
Martin Probst 8409b65153 fix(http): make normalizeMethodName optimizer-compatible. (#12370)
`normalizeMethodName` reflectively accessed the RequestMethod enum. With a smart
optimizer, properties from the enum could be removed or renamed, and so user
code just passing in e.g. 'PATCH' might not work. This change fixes the code to
be more explicit and avoids the optimizer issue.
2016-10-18 11:21:54 -07:00
Victor Berchet 38e2203b24 refactor(core): delete unused reflector code 2016-10-17 23:17:34 -07:00
Victor Berchet bd1dcb5f11 fix(core): fix decorator defalut values 2016-10-17 23:17:34 -07:00