Commit Graph

5027 Commits

Author SHA1 Message Date
Dzmitry Shylovich 551fe50ebd feat(forms): introduce AsyncValidator interface (#13483)
Closes #13398
2017-02-20 16:26:51 -08:00
Victor Berchet d6a58f9f70 feat(core): make `new Inject()` optional for deps specified as `InjectionToken` (#14486)
fixes #10625
2017-02-20 16:20:45 -08:00
Victor Berchet 5f3c8441e4 refactor(router): misc
closes #14517
2017-02-20 16:19:20 -08:00
Victor Berchet 78e8814103 feat(router): add `RouteConfigLoadStart` and `RouteConfigLoadEnd` events 2017-02-20 16:19:05 -08:00
Dzmitry Shylovich 7df6f46c1c feat(router): introduce RouteConfigLoaded event
Closes #14036
2017-02-20 16:19:05 -08:00
Victor Berchet 601fd3e305 fix(platform-webworker): integrate review feedback
closes #14581
2017-02-20 16:17:58 -08:00
Victor Berchet cdf99cf68b refactor(platform-webworker): cleanup 2017-02-20 16:17:43 -08:00
Victor Berchet 3517f28609 feat(platform-webworker): renderer v2 integration 2017-02-20 16:17:43 -08:00
Victor Berchet f38dbfbd64 refactor(platform-webworker): misc cleanup 2017-02-20 16:17:43 -08:00
Igor Minar 1bdf7061b8 release: cut v4.0.0-beta.8 2017-02-18 15:00:33 -08:00
Ward Bell 5129e8e47c docs(router): fix typo in canLoad interface doc comment (#14519) 2017-02-18 14:28:45 -08:00
Tobias Bosch ab26b6518d fix(platform-browser): allow to mix shadow dom with non shadow dom
Allow to style components that don’t use shadow dom inside of components that do.

This reverts 53cf2ec573
and adds a test for this case.

Related to #7887
2017-02-17 17:18:55 -08:00
Tobias Bosch 778ded9fcf refactor: rename `ComponentRenderTypeV2` to `RendererTypeV2` 2017-02-17 17:18:55 -08:00
Tobias Bosch b9f17a9cb2 fix: make all tests green with new view engine and JIT
Note that this does not yet include enabling the view engine
by default.

Included refactoring:
- view engine: split namespace of elements / attributes already
  when creating the `NodeDef`
- view engine: when injecting the old `Renderer`, use an implementation
  that is based on `RendererV2`
- view engine: store view queries in the component view, not
  on the host element
2017-02-17 17:18:55 -08:00
David Purpura 96d06f7f09 fix(upgrade): Prevent property renaming for $inject.
Switch to bracket notation for `directiveFactory.$inject`, otherwise Closure Compiler will (property) rename it, since the output type is `any`.
2017-02-16 15:35:50 -08:00
Igor Minar 6c20e6ca2e docs(core): fix typo in animation docs 2017-02-16 14:57:23 -08:00
Tobias Bosch 0fa3895d5b feat(compiler): implement style encapsulation for new view engine (#14518)
Included refactoring:
- splits the `RendererV2` into a `RendererFactoryV2` and a `RendererV2`
- makes the `DebugRendererV2` a private class in `@angular/core`
- remove `setBindingDebugInfo` from `RendererV2`, but rename `RendererV2.setText` to 
  `RendererV2.setValue` and allow it on comments and text nodes.

Part of #14013
2017-02-16 13:55:55 -08:00
Matias Niemelä ba17dcbf2b refactor(animations): multiple group animations should tally-up delays correctly 2017-02-16 12:10:32 -08:00
Matias Niemelä 88e3d7af9f refactor(animations): do not inherit past styles into sub timelines 2017-02-16 12:10:32 -08:00
Dzmitry Shylovich b36f60c74c docs(router): fix broken link (#14431)
Closes #14430
2017-02-16 11:32:17 -08:00
Victor Berchet 57461e9ed7 docs(router): fix guards API docs (#14528) 2017-02-16 10:26:53 -08:00
Alex Rickabaugh 612f120208 fix(platform-server): default unspecified sections of the url to empty string (#14512) 2017-02-16 10:18:55 -08:00
Chuck Jazdzewski 724ca373e7 build: produce metadata bundles for @angular modules (#14509)
Closes #14509
2017-02-16 08:15:30 -08:00
Alex Rickabaugh 56f232cdd7 fix(platform-server): read initial location from INITIAL_CONFIG if present 2017-02-15 09:14:59 -08:00
Alex Rickabaugh 047cda5b3c fix(platform-server): reflect properties to attributes for known elements, for serialization 2017-02-15 09:14:59 -08:00
Alex Rickabaugh 9559d3e949 feat(platform-server): support @angular/http from @angular/platform-server
This change installs HttpModule with ServerModule, and overrides bindings to
service Http requests made from the server with the 'xhr2' NPM package.

Outgoing requests are wrapped in a Zone macro-task, so they will be tracked
within the Angular zone and cause the isStable API to show 'false' until they
return. This is essential for Universal support of server-side HTTP.
2017-02-15 09:14:59 -08:00
Alex Rickabaugh 30380d010b fix(platform-server): render styles in app component instead of <head>
This ensures when the tree is serialized to the client and the app is later bootstrapped,
the <style> tags created during server-side rendering are destroyed.
2017-02-15 09:14:59 -08:00
Vikram Subramanian 17486fd696 fix(platform-server): allow multiple instances of platformServer and platformDynamicServer 2017-02-15 09:14:59 -08:00
Tobias Bosch 4e7752a12a feat(compiler): integrate compiler with view engine (#14487)
Aspects: di, query, content projection

Included refactoring:
- use a number as query id
- use a bloom filter for aggregating matched queries of nested elements
- separate static vs dynamic queries

Part of #14013
2017-02-15 08:36:49 -08:00
Victor Berchet bb9c7ae6e7 feat: RendererV2 integration (#14469) 2017-02-14 21:03:18 -08:00
vikerman b4d444a0a7 feat(platform-server): add API to render Module and ModuleFactory to string (#14381)
- PlatformState provides an interface to serialize the current Platform State as a string or Document.

- renderModule and renderModuleFactory are convenience methods to wait for Angular Application to stabilize and then render the state to a string.

- refactor code to remove defaultDoc from DomAdapter and inject DOCUMENT where it's needed.
2017-02-14 16:14:40 -08:00
Alex Eagle 2f2b65bd38 fix(core): suppress a Closure Compiler warning (#14484) 2017-02-14 14:44:16 -08:00
Chuck Jazdzewski 8b81bb1eb6 feat(compiler): generate shallow imports compiler generated references (#14388) 2017-02-14 13:33:06 -08:00
Tobias Bosch e4e9dbe33d feat(compiler): integrate compiler with view engine - change detection tests work (#14412)
Included refactoring:
- make ViewData.parentIndex point to component provider index
- split NodeType.Provider into Provider / Directive / Pipe
- make purePipe take the real pipe as argument to detect changes
- order change detection:
  1) directive props
  2) renderer props

Part of #14013

PR Close #14412
2017-02-13 17:02:00 -06:00
Alex Eagle 5279d06e88 ci: re-format sources (#14413)
PR Close #14413
2017-02-10 19:05:45 -06:00
Miško Hevery 563334e2c9 ci: remove left over fdescribe 2017-02-10 19:05:00 -06:00
Miško Hevery b565301186 fix(compiler): REVERT allow absolute style urls (#14365)
This reverts commit 6b9aa2ca3d.
2017-02-10 18:23:58 -06:00
Dzmitry Shylovich 1ece7366c8 fix(forms): getRawValue should correctly work with nested FormGroups/Arrays (#12964)
Closed #12963

PR Close #12964
2017-02-10 15:04:25 -06:00
Victor Berchet 7ac38aa357 feat(compiler): add support for source map generation (#14258)
fixes #14125

PR Close #14258
2017-02-10 15:04:15 -06:00
Dzmitry Shylovich 53cf2ec573 fix(platform-browser): should only add styles with native encapsulation in shadow DOM (#14313)
Closes #7887

PR Close #14313
2017-02-10 15:03:20 -06:00
Dzmitry Shylovich 1cfbefebe3 fix(platform-browser): should not throw for debug attrs containing $ (#14353)
Closes #9566

PR Close #14353
2017-02-10 15:03:05 -06:00
Dzmitry Shylovich e5a144d902 fix(compiler): improve error msg for unknown properties on (#14373)
ng-container/ng-content

Closes #14070

PR Close #14373
2017-02-10 15:03:05 -06:00
Dzmitry Shylovich 2c6dab970b fix(compiler): improve error message for unknown elements (#14373) 2017-02-10 15:03:05 -06:00
Alex Rickabaugh 9e28568a8f feat(platform-server): Implement PlatformLocation for platformServer() (#14405)
This gives server-side apps a current URL including hash, but doesn't implement a state stack,
so back-and-forward navigation isn't possible.

PR Close #14405
2017-02-10 15:03:05 -06:00
Alex Eagle 03e855ae8f build: allow users to specify --strictNullChecks (#14382)
PR Close #14382
2017-02-10 14:10:03 -06:00
Matias Niemelä 96073e51c3 refactor(animations): introduce @angular/animation module (#14351)
PR Close: #14351
2017-02-10 14:10:03 -06:00
Tobias Bosch baa654a234 feat(compiler): integrate compiler with view engine - main integration tests work (#14284)
Part of #14013

PR Close #14284
2017-02-10 14:10:03 -06:00
Mathou54 dfe29934b6 test(forms): test undefined as argument to forms (#13720)
PR Close #13720
2017-02-10 14:10:03 -06:00
Bowen Ni 44bb337acc fix(compiler): disable non-components as an entry component (#14335)
PR Close #14335
2017-02-09 14:45:49 -08:00
Alex Eagle b9d293af03 build: first pass of de-duplicating tsconfig.json content (#14369)
PR Close #14369
2017-02-09 14:32:40 -08:00
Chuck Jazdzewski 4da7925ad5 feat(common): added typed overloaded for `AsyncPipe.transform()` (#14367)
BREAKING CHANGE: Classes that derive from `AsyncPipe` and override
`transform()` might not compile correctly. Use of  `async` pipe in
templates is unaffected.

Mitigation: Update derived classes of `AsyncPipe` that override
`transform()` to include the type parameter overloads.

Related to #12398

PR Close #14367
2017-02-09 14:32:39 -08:00
Dzmitry Shylovich 6b9aa2ca3d fix(compiler): allow absolute style urls (#14365)
Closes #4974

PR Close #14365
2017-02-09 14:32:39 -08:00
Bowen Ni a696f4aade fix(compiler): improve error messages in aot compiler (#14333)
Do not print the stack trace when the component is not declared in the module.

PR Close #14333
2017-02-09 14:32:39 -08:00
Victor Berchet bb4db2d8f3 feat(compiler): add target locale to the translation bundles (#14290)
PR Close #14290
2017-02-09 14:32:39 -08:00
Miško Hevery 4676df5833 fix(http): REVERT: remove dots from jsonp callback name (#13219)
This reverts commit 9e5617e41e.
2017-02-09 15:34:12 -06:00
FrozenPandaz 45cc444154 fix(core): Remove ChangeDetectorRef Paramter from KeyValueDifferFactory and IterableDifferFactory (#14311)
BREAKING CHANGE:

- `KeyValueDifferFactory` and `IterableDifferFactory` no longer have `ChangeDetectorRef` as 
  a parameter. It was not used and has been there for historical reasons. If you call 
  `DifferFactory.create(...)` remove the `ChangeDetectorRef` argument.
2017-02-09 13:33:44 -08:00
Victor Berchet 881dce841f refactor(compiler): Load the translation bundle only once in the i18n html parser (#14362)
fixes #14322
2017-02-09 12:08:23 -06:00
Vikram Subramanian c4817988ca feat(core): add isStable Observable property to ApplicationRef to indicate when it's stable and unstable (#14337)
PR Close #14337
2017-02-09 12:07:33 -06:00
Miško Hevery c871af7b5a chore(release): cut the 4.0.0-beta.7 release 2017-02-09 09:36:10 -08:00
Miško Hevery a7688d27f2 refactor(core): change typedef of NodeCheckFn to pass tsickle 2017-02-08 18:05:21 -06:00
Tobias Bosch 24af51a623 fix(core): view engine - fix perf regressions (#14345)
- Make sure `NodeDef`s don’t fall into dictionary mode.
- Use strategy pattern to add debug information / checks, instead of constantly checking for `isDevMode`.
- introduce a very light weight `RendererV2` interface to not have duplicate
  code paths for direct and non direct rendering

The strategy pattern is implemented via the new `Services` object.

Part of #14013

PR Close #14345
2017-02-08 14:42:22 -06:00
Tobias Bosch f6b5965a63 fix(benchmarks): don’t force gc on the `profile` buttons (#14345)
This causes v8 to depotimize functions permanently in same cases.
2017-02-08 14:42:01 -06:00
Alex Eagle ef32e6b0d0 fix: build and test fixes for TS 2.1 (#13294) 2017-02-08 11:32:40 -06:00
Alex Eagle 5c431cee02 build: remove post-processing of .d.ts files (#13294)
Note that the duplication in tsconfig.json files will be fixed in a followup CL now that we have tsconfig inheritance

BREAKING CHANGE: Angular 4 will support only TypeScript 2.1, so we no longer provide backwards compatibility to TS 1.8.
2017-02-08 11:32:34 -06:00
Miško Hevery c33fda2607 perf: Don’t subclass Error; resulting in smaller binary (#14160)
Subclassing errors is problematic since Error returns a
new instance. All of the patching which we do than prevent
proper application of source maps.

PR Close #14160
2017-02-07 19:18:26 -06:00
Misko Hevery 3c2842be96 refactor: remove unneeded output_emitter_utils (#14160) 2017-02-07 19:17:58 -06:00
Georgios Kalpakas 94312f0980 perf(upgrade): unregister `$doCheck` watcher when destroying upgraded component (#14303)
PR Close #14303
2017-02-07 16:16:29 -06:00
mgechev a378aab9aa docs(compiler): incorrect method reference (#14314)
PR Close #14314
2017-02-07 12:45:15 -06:00
Georgios Kalpakas 1e3dd3dd9b fix(upgrade): pass correct values to `ngOnChanges` for interpolation bindings (#14301)
Previously, the `previousValue` and `currentValue` arguments passed to the
`SimpleChange` constructor were swapped for interpolation bindings.

This commit also refactors the code, so that interpolation bindings and property
bindings share the same implementation, and fixes some broken tests (that hide
failures by allowing the `$exceptionHandler` to swallow thrown exceptions).

PR Close #14301
2017-02-07 12:45:14 -06:00
Gerd Jungbluth 701074cf89 docs(core): fix typo (#14299)
Replace `than` with `then`.

PR Close #14299
2017-02-07 12:45:14 -06:00
NFM d0366542fb docs(router): fix typos (#14213)
PR Close #14213
2017-02-07 12:45:14 -06:00
Marc Laval e58d683931 fix(compiler-cli): prevent ng-xi18n from emitting the compilation output (#14115)
fixes #13567

PR Close #14115
2017-02-07 11:56:23 -06:00
Peter Bacon Darwin 80b66edfa7 docs(zone): fix whitespace around backtick code
If there is no leading empty line then the markdown renderers get confused.
2017-02-06 12:08:57 -08:00
Georgios Kalpakas 41db177d0c test(upgrade): test projection on downgraded components with structural directives (#14276)
Brings the tests of #14274 to master.

PR Close #14276
2017-02-03 15:08:26 -06:00
Tobias Bosch 14d7844b2b feat(core): view engine - integrate with `ComponentFactory` (#14237)
`ComponentFactory`s can now be created from a `ViewDefinitionFactory` via
`RefFactory.createComponentFactory`.

This commit also:
- splits `Services` into `Refs` and `RootData`
- changes `ViewState` into a bitmask
- implements `ViewContainerRef.move`

Part of #14013

PR Close #14237
2017-02-03 15:07:12 -06:00
Chuck Jazdzewski 388afa414e test(compiler): add integration like tests to compiler unit tests (#14157)
Closes PR #14157

PR Close #14157
2017-02-03 15:06:51 -06:00
Misko Hevery 1961332f26 chore(release): cut the 4.0.0-beta.6 release 2017-02-02 21:01:27 -08:00
Miško Hevery 69a4bb0bcd doc: standardize deprecation of `preserveQueryParams` (4.0 only) (#14236)
PR closes #14236
2017-02-01 16:48:19 -08:00
Miško Hevery a7479f657a fix: ngModel should use rxjs/symbol/observable to detect observable (#14236)
PR closes #14236
2017-02-01 16:47:41 -08:00
Tobias Bosch a05e50fda3 feat(core): view engine - add missing DI features (#14225)
Part of #14013

PR Close #14225
2017-02-01 14:16:01 -06:00
Tobias Bosch ae7f5f37d2 refactor(core): view engine - remove `ViewData.parentDiIndex` (#14225)
Instead, calculate it on the fly

Part of #14013
2017-02-01 14:15:47 -06:00
Tobias Bosch 45e1e36477 feat(core): view engine - add support for `OnPush` and detached views. (#14216)
Part of #14013

PR Close #14216
2017-02-01 14:15:47 -06:00
Tobias Bosch 08ff67ea11 feat(core): view engine - add `WrappedValue` support (#14216)
Part of #14013
2017-02-01 14:15:38 -06:00
Miško Hevery 1bc5368ea0 fix: closure compiler warning (#14229)
PR Close #14229
2017-02-01 14:11:52 -06:00
Dzmitry Shylovich 093cc04748 fix(common): DatePipe parses input string if it's not a valid date in browser (#13895)
Closes #12334
Closes #13874

PR Close #13895
2017-02-01 14:01:58 -06:00
Dzmitry Shylovich 9d2c71269b refactor(common): remove isDate from facade (#13895) 2017-02-01 14:01:46 -06:00
Tobias Bosch 0a29574d98 feat(core): view engine - support content projection (#14209)
Part of #14013

PR Close #14209
2017-02-01 09:29:51 -06:00
Chuck Jazdzewski 86b2b2504f feat(common): rename underlying `NgFor` class and add a type parameter (#14104)
Note, this affects the underlying class and should not affect usage.

DEPRECATION:
- the `NgFor` class is now deprecated. Use `NgForOf<T>` instead.
  IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor`
  directive. The `*ngFor` and related directives are unaffected by
  this change  as references to the `NgFor` class generated from
  templates will be automatically converted to references to
  `NgForOf<T>` without requiring any template modifications.
- `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead.

Migration:
- Replace direct references to the `NgFor` class to `NgForOf<any>`.
- Replace references to `TrackByFn` to `TrackByFunction<any>`.

BREAKING CHANGE:
A definition of `Iterable<T>` is now required to correctly compile
Angular applications. Support for `Iterable<T>` is not required at
runtime but a type definition `Iterable<T>` must be available.

`NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at
runtime. With this change the type definition is updated to reflect
this support.

Migration:
- add "es2015.iterable.ts" to your tsconfig.json "libs" fields.

Part of #12398

PR Close #14104
2017-02-01 09:29:51 -06:00
Chuck Jazdzewski 69e14b500b feat(compiler): generate type parameters for generic type references (#14104) 2017-02-01 09:29:51 -06:00
Georgios Kalpakas 7670cc1a86 feat(upgrade): export VERSION from `upgrade/static` (#14037)
PR Close #14037
2017-02-01 09:29:51 -06:00
Georgios Kalpakas ea63676970 refactor(upgrade): use shared code in `downgradeNg2Component()` (#14037)
This unified the implementations of dynamic's `downgradeNg2Component()` and
static's `downgradeComponent()`.
2017-02-01 09:29:51 -06:00
Georgios Kalpakas 1367cd9569 fix(upgrade): respect hierarchical injectors for downgraded components (#14037)
Correctly wire up hierarchical injectors for downgraded components in
`upgrade/static`: Downgraded components inherit the injector of the first
downgraded component up the DOM tree.

This is similar to (part of) d91a86a, but for `upgrade/static`.

POSSIBLE BREAKING CHANGE:

In order to enable more control over the wiring of downgraded components and
their content (which eventually allows better control over features like
injector setup and content projection), it was necessary to change the
implementation of the directives generated for downgraed components.

The directives are now terminal and manually take care of projecting and
compiling their contents in the post-linking function. This is similar to how
the dynamic version of `upgrade` does it.

This is not expected to affect apps, since the relative order of individual
operations is preserved. Still, it is difficult to predict how every possible
usecase may be affected.
2017-02-01 09:29:51 -06:00
Georgios Kalpakas 9aafdc7b02 feat(upgrade): allow non-element selectors for downgraded components (#14037)
This affects the dynamic version of `upgrade` and makes it more consistent with
the static version, while removing an artificial limitation.

This commit also refactors the file layout and code, in order to share code wrt
to dowgrading components between the dynamic and static versions.
2017-02-01 09:29:51 -06:00
Georgios Kalpakas 1f90f29369 feat(upgrade): return a function (instead of array) from `downgradeInjectable()` (#14037)
This makes it more consistent with the dynamic version of `upgrade` and makes it
possible to share code between the dynamic and static versions.

This commit also refactors the file layout, moving common and dynamic-specific
files to `common/` and `dynamic/` directories respectively and renaming `aot/`
to `static/`.

Some private keys, used as AngularJS DI tokens, have also been renamed, but this
should  not affect apps, since these keys are undocumented and not supposed to
be used externally.

BREAKING CHANGE:

Previously, `upgrade/static/downgradeInjectable` returned an array of the form:

```js
['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }]
```

Now it returns a function with an `$inject` property:

```js
factory.$inject = ['dep1', 'dep2', ...];
function factory(dep1, dep2, ...) { ... }
```

It shouldn't affect the behavior of apps, since both forms are equally suitable
to be used for registering AngularJS injectable services, but it is possible
that type-checking might fail or that current code breaks if it relies on the
returned value being an array.
2017-02-01 09:29:51 -06:00
Miško Hevery e0e5e78835 fix: lint errors to make circle-ci green 2017-01-31 19:01:48 -06:00
Alex Eagle b4214d60a6 fix(compiler): allow expressions or functions in extends (#14158)
Fixes #14154

PR Close #14158
2017-01-31 18:35:10 -06:00
Victor Berchet 5921c872b6 fix(compiler): only lex messages that are needed by angular (#14208)
To avoid the lexer erroring on syntax not supported by Angular.

PR Close #14208
2017-01-31 16:21:55 -06:00
Tobias Bosch 52b21275f4 feat(core): view engine - add debug information (#14197)
Creates debug information for the renderer,
and also reports errors relative to the
declaration place in the template.

Part of #14013

PR Close #14197
2017-01-31 16:21:54 -06:00
Chuck Jazdzewski 49fb8143e8 fix(language-service): do not crash when Angular cannot be located (#14123)
Fixes #14122

PR Close #14123
2017-01-31 15:45:52 -06:00
cexbrayat 5f2b3173d7 fix(http): use params without RequestOptions (#14101)
`params` has been introduced in 4.0.0-beta.0

Before:

    http.get(url, new RequestOptions({params: searchParams}))

After:

    http.get(url, {params: searchParams})

Fixes #14100

PR Close #14101
2017-01-31 15:44:49 -06:00
evan Liu c87c3bec93 feat(router): deprecate preserveQueryParams,add queryParamsHandling (#14095)
PR Close #14095
2017-01-31 15:43:25 -06:00
Dzmitry Shylovich 2ffa1a71aa docs(forms): fix FormArray description (#14094)
Closes #14075

PR Close #14094
2017-01-31 15:42:42 -06:00
Toxicable 94f84c5d7e fix(forms): Verify functions passed into async validators returns Observable or Promise (#14053) 2017-01-31 12:15:56 -06:00
Dzmitry Shylovich ff290af38c fix(common): introduce isObservable method (#14067)
Closes #8848

PR Close #14067
2017-01-31 12:14:19 -06:00
Dzmitry Shylovich fe441186e7 fix(common): add PopStateEvent interface (#13400)
Closes #13378

PR Close #13400
2017-01-31 12:08:54 -06:00
Dzmitry Shylovich f89d004c51 fix(forms): provide a method to compare options (#13349)
Closes #13268

PR Close #13349
2017-01-31 11:38:30 -06:00
Dzmitry Shylovich 6c7300c7de fix(forms): async validator cancels previous subscription when input has changed (#13222)
Fixes #12709
Fixes #9120
Fixes #10074
Fixes #8923

PR Close #13222
2017-01-31 11:37:25 -06:00
Alex Eagle 22058298d3 fix(closure): suppress some closure compiler warnings (#14198)
PR Close #14198
2017-01-30 18:34:14 -06:00
Dzmitry Shylovich 1df9319af1 fix(forms): fix broken unit test (#14179) 2017-01-30 10:07:09 -08:00
Toxicable 7b7ae5fe56 feat(forms): add equalsTo validator (#14052)
PR Close: #14052
2017-01-29 12:22:24 -06:00
WilliamKoza 94b62c963d fix(common) add interface PipeTransform to Async pipe (#14049)
PR Close #14049
2017-01-29 12:18:55 -06:00
Dzmitry Shylovich 579567ca79 fix(router): fix CanActivateChild guard provided in a lazy loaded module (#13989)
Closes #12275

PR Close #13989
2017-01-29 12:17:03 -06:00
Dzmitry Shylovich 47d41d492b fix(router): fix navigation from the root component ngOnInit hook (#13932)
Closes #13795

PR Close #13932
2017-01-29 12:16:12 -06:00
Dzmitry Shylovich e075b1ba83 fix(router): fix CanActivate redirect to the root on initial load (#13929)
Closes #13530

PR Close #13929
2017-01-29 12:15:46 -06:00
Dzmitry Shylovich 029f558d45 fix(forms): select shows blank line when nothing is selected in IE/Edge (#13903)
Closes #10010

PR Close #13903
2017-01-29 12:15:11 -06:00
执衡 c5ea03a023 feat(ngModel):handle ime events (#13891)
PR Close: #13891
2017-01-29 12:14:32 -06:00
Dzmitry Shylovich cd3901f774 fix(platform-browser): remove style nodes on destroy (#13744)
Closes #11746

PR Close #13744
2017-01-29 12:10:44 -06:00
Dzmitry Shylovich a64c9b5d5b refactor(platform-browser): polishing (#13744) 2017-01-29 12:10:39 -06:00
Dzmitry Shylovich 863285a4b0 fix(core): add bootstrapped modules into platform modules list (#13740)
Closes #12015

PR Close #13740
2017-01-29 12:09:46 -06:00
Dimitri Benin 5f40e5ba21 fix(testing): async/fakeAsync/inject/withModule helpers should pass through context to callback functions (#13718)
Make sure that context (`this`) that is passed to functions generated by test helpers is passed through to the callback functions. Enables usage of Jasmine's variable sharing system to prevent accidental memory leaks during test runs.
2017-01-29 12:08:53 -06:00
Dzmitry Shylovich d69717cf79 feat(forms): add email validator (#13709)
Closes #13706

PR Close #13709
2017-01-29 12:07:05 -06:00
Georgios Kalpakas 00979838ef refactor(upgrade): allow Closure advanced optimizations in `UpgradeComponent` (#13629)
Get rid of the dynamic invocation style used in `callLifecycleHook()`, which
would break under Closure Compiler's advanced optimizations.
Related to https://github.com/angular/angular/pull/13020#discussion_r93492935.

PR Close #13629
2017-01-29 12:02:52 -06:00
Dzmitry Shylovich a277e97dd7 fix(core): ViewContainerRef.indexOf doesn't throw error when empty (#13220)
PR Close #13220
2017-01-29 11:50:23 -06:00
Dzmitry Shylovich 9e5617e41e fix(http): remove dots from jsonp callback name (#13219)
PR Close #13219
2017-01-29 11:49:40 -06:00
Nuno Arruda 0854a5dea4 style(docs): update copyright years (#13736) 2017-01-27 20:47:14 -08:00
Jason Aden c37af2af5a refactor(core): simplify ReflectiveInjector by removing code for Dart implementation (#14126)
ReflectiveInjector previously used two strategies for resolving dependencies. These
were to support the Dart implementation, but are no longer needed. A result of this
PR is there is no longer a 20 dependency limit and the generated code is smaller.

PR Close #14126
2017-01-27 13:22:32 -08:00
Igor Minar da41a954b5 docs: branding fixes (#14132)
Angular 1.x -> AngularJS
Angular 1 -> AngularJS
Angular1 -> AngularJS
Angular 2+ -> Angular
Angular 2.0 -> Angular
Angular2 -> Angular

I have deliberately not touched any of the symbol names as that would cause big merge collisions with Tobias's work.

All the renames are in .md, .json, and inline comments and jsdocs.

PR Close #14132
2017-01-27 15:03:11 -06:00
Igor Minar 5a997ef4f0 docs: remove obsolete bundles/overview.md file (#14132) 2017-01-27 15:02:59 -06:00
Misko Hevery d339d8b81d refactor(abstract): Use abstract keyword where possible to decrease file size. (#14112)
PR Close: #14112
2017-01-27 12:32:22 -08:00
Victor Berchet 827c3fe199 fix(compiler): fix missing translations handling (#14113)
PR Close #14113
2017-01-27 12:12:06 -06:00
Gion Kunz 8775ab9495 feat(compiler): allow missing translations (#14113)
closes #13861
2017-01-27 12:10:59 -06:00
Victor Berchet 5885c52c1f refactor(compiler): add ability to get the context around a `ParseLocation` (#14113) 2017-01-27 12:10:47 -06:00
Tobias Bosch f802194c18 refactor(core): have different data types for each node. (#14120)
Also have a new node type for queries.

This leads to less memory usage and better performance.

Deep Tree Benchmark results (depth 11):
- createAndDestroy (view engine vs current codegen):
  * pureScriptTime: 78.80+-4% vs 72.34+-4%
  * scriptTime: 78.80+-4% vs 90.71+-9%
  * gc: 5371.66+-108% vs 9717.53+-174%
  * i.e. faster when gc is also considered and about 2x less memory usage!
- update unchanged

Part of #14013
PR Close #14120
2017-01-27 12:08:54 -06:00
Dzmitry Shylovich 7ad616a177 fix(common): DatePipe doesn't throw for NaN (#14117)
Fixes #14103

PR Close #14117
2017-01-27 12:07:47 -06:00
Misko Hevery 670b680b0a refactor(size): Use abstract keyword where possible to decrease file size. (#14112) 2017-01-27 12:00:58 -06:00
Victor Berchet f7fba74c58 feat(compiler): do not parse xtb messages not needed by angular (#14111)
fixes #14046

PR Close #14111
2017-01-27 11:52:57 -06:00
Peter Bacon Darwin 20b454cbc9 fix(upgrade): detect async downgrade component changes (#14039)
This commit effectively reverts 7e0f02f but for `upgrade/static`
as it was an invalid fix for #6385, that created a more significant
bug, which was that changes were not always being detected.

Angular 1 digests should be run inside the ngZone to ensure
that async changes are detected.

We don't know how to fix #6385 without breaking change detection
at this stage. That issue is triggered by async operations, such as
`setTimeout`, being triggered inside scope watcher functions.

One could argue that watcher functions should be pure and not do
work such as triggering async operations. It is possible that the
original use case could be supported by moving the debounce
logic into the watch listener function, which is only called if the
watched value actually changes.

See #13812

PR Close #14039
2017-01-27 11:51:55 -06:00
Bowen Ni 665dde2e5c refactor(compiler): improve error messages in aot compiler (#14017)
Previously aot compiler prints stack traces when it fails to resolve.
New behavior: aot compiler outputs the error message.
Example: https://gist.github.com/bowenni/a7fe81d916e8cd4a06b0e133436f40fb

PR Close #14017
2017-01-27 11:49:38 -06:00
Peter Bacon Darwin b7763559cd build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00
Peter Bacon Darwin 2dd9654004 docs(http): vanilla links do not need link tags (#14097) 2017-01-26 23:46:51 -08:00
Peter Bacon Darwin e35c25d2ce docs(router): remove invalid jsdoc tags (#14097)
The `@selector` tags are not valid.
Dgeni should be able to extract this information
from the directive annotation metadata.
2017-01-26 23:46:38 -08:00
Tobias Bosch 1e729d7ba2 feat(core): add query support to view engine
Part of #14013
closes #14084
2017-01-25 17:44:56 -08:00
Tobias Bosch fc8694ed11 refactor(core): view engine, refactor runtime data
Structure in a better way, in preparation for queries.
2017-01-25 17:44:42 -08:00
Victor Berchet 05b2b49711 fix(compiler): allow empty translations for attributes (#14085)
fixes #13897
2017-01-25 17:43:19 -08:00
Jason Aden 3ef73c2b19 feat(NgComponentOutlet): add NgModule support to NgComponentOutlet directive (#14088)
Allow NgComponentOutlet to dynamically load a module, then load a component from
that module. Useful for lazy loading code, then add the lazy loaded code to the
page using NgComponentOutlet.

Closes #14043
2017-01-25 17:41:08 -08:00
Alex Rickabaugh 28bdc5af47 chore(release): cut the 4.0.0-beta.5 release 2017-01-25 15:38:19 -08:00
Alex Rickabaugh d2859cdd71 style(compiler): run format 2017-01-25 13:17:18 -08:00
Matias Niemelä 4931a615bf docs(core): add docs for `AnimationStyles` and `AnimationKeyframe` (#14107) 2017-01-25 11:46:15 -08:00
Victor Berchet a733444d0e docs(compiler): add comment to warn about regexp changes (#14106)
ref #14082
2017-01-25 10:27:18 -08:00
Pete Bacon Darwin 6152eb24bc fix(upgrade/static): ensure upgraded injector is initialized early enough (#14065)
This change ensures that the upgraded AngularJS injector is initialized
before the application run blocks are executed.

Closes #13811
2017-01-24 14:48:03 -08:00