Matias Niemelä
7f9c589ba3
feat(core): add `begin` and `end` renderer methods to track change detection
2017-05-04 15:07:27 -04:00
Georgios Kalpakas
b3e63c09ab
fix(upgrade): initialize all inputs in time for `ngOnChanges()`
...
Previously, non-bracketed inputs (e.g. `xyz="foo"`) on downgraded components
were initialized using `attrs.$observe()` (which uses `$evalAsync()` under the
hood), while bracketed inputs (e.g. `[xyz]="'foo'"`) were initialized using
`$watch()`. If the downgraded component was created during a `$digest` (e.g. by
an `ng-if` watcher), the non-bracketed inputs were not initialized in time for
the initial call to `ngOnChanges()` and `ngOnInit()`.
This commit fixes it by using `$watch()` to initialize all inputs. `$observe()`
is still used for subsequent updates on non-bracketed inputs, because it is more
performant.
Fixes #16212
2017-05-03 19:32:57 -07:00
Igor Minar
71f5b73296
docs: fix links in api docs
2017-05-03 09:22:32 +01:00
Tobias Bosch
c946a929b7
refactor(compiler): simplify AOT tests
2017-05-02 15:51:54 -07:00
Tobias Bosch
e263e19a2a
fix(core): don’t stop change detection because of errors
...
- prevents unsubscribing from the zone on error
- prevents unsubscribing from directive `EventEmitter`s on error
- prevents detaching views in dev mode if there on error
- ensures that `ngOnInit` is only called 1x (also in prod mode)
Fixes #9531
Fixes #2413
Fixes #15925
2017-05-01 18:56:25 -04:00
Chuck Jazdzewski
253345c0c0
fix(language-service): remove asserts for non-null expressions ( #16422 )
...
Reworked some of the code so asserts are no longer necessary.
Added additional and potentially redundant checks
Added checks where the null checker found real problems.
PR Close #16422
2017-04-28 22:50:31 -05:00
Victor Berchet
270d694ed2
docs(common): fix API docs for NgComponentOutlet ( #16411 )
...
fixes #16373
PR Close #16411
2017-04-28 18:11:24 -05:00
Chuck Jazdzewski
f4b771a0c6
feat(language-service): provide external file list to TypeScript ( #16417 )
...
Also ensures that it only calls base language service for files
that it contains.
PR Close #16417
2017-04-28 18:11:18 -05:00
Tobias Bosch
a4de214e2b
fix(core): don’t set `ng-version` for dynamically created components ( #16394 )
...
Angular uses the `ng-version` attribute to indicate which elements
were used to bootstrap an application. However, after 4.0 we also
added this attribute for all dynamically created components.
Fixes #15880
PR Close #16394
2017-04-28 17:41:50 -05:00
Tobias Bosch
aa8bba4865
fix(core): allow to detach `OnPush` components ( #16394 )
...
Fixes #9720
2017-04-28 17:41:45 -05:00
Tobias Bosch
392d584572
fix(core): allow directives to inject the component’s `ChangeDetectorRef`. ( #16394 )
...
When a directive lives on the same element as a component
(e.g. `<my-comp myDir>`), the directive was not able to get hold
of the `ChangeDetectorRef` of the component on that element. However,
as directives are supposed to decorate components, this is incorrect.
This commit enables this use case.
Closes #12816
2017-04-28 17:41:31 -05:00
Christoph Krautz
900a88b15d
feat(core): allow custom selector when bootstrapping components ( #15668 )
...
- fixes #7136
PR Close #15668
2017-04-28 17:41:04 -05:00
Miško Hevery
8c09d10ba9
fix: strictNullCheck support. ( #16389 ) ( #16389 )
...
Fix #16357
Workaround for https://github.com/Microsoft/TypeScript/issues/10078
Closes #16389
PR Close #16389
2017-04-28 09:15:00 -05:00
Toxicable
81925fa66d
feat(forms): introduce min and max validators ( #15813 )
...
PR Close #15813
2017-04-27 17:39:17 -05:00
Olivier Combe
6e2abcd5fc
feat(compiler-cli): add param to set MissingTranslationStrategy on ngc ( #15987 )
...
This commit adds a new parameter to ngc named `missingTranslation` to set the MissingTranslationStrategy for AoT, it takes the value `error`, `warning` or `ignore`.
Fixes #15808
PR Close #15987
2017-04-27 17:38:59 -05:00
Miško Hevery
cb35c26d70
release: cut the 4.1.0 release
2017-04-26 10:49:19 -05:00
Georgios Kalpakas
d1fb066d07
fix(upgrade): use correct attribute name for upgraded component's bindings ( #16128 )
...
Previously, when using a different property/attribute name for an upgraded
component's binding (e.g. `bindings: {propName: '<attrName'}`), the property and
attribute names were swapped (e.g. using `attrName` as the property name and
`propName` as the attribute name). This resulted in unexpected behavior.
This commit fixes this using the correct names for properties and attributes.
This only affects `upgrade/dynamic`. `upgrade/static` works correctly already.
Fixes #8856
PR Close #16128
2017-04-24 12:14:03 -05:00
Victor Berchet
2f977312be
fix(router): forward the query parameters in the ng1 -> ng2 url sync ( #16249 )
...
fixes #16067
PR Close #16249
2017-04-24 12:13:47 -05:00
Miško Hevery
b37f5fc59b
release: cut the 4.1.0-rc.0 release
2017-04-21 00:12:10 -05:00
David
745731e1a3
fix(compiler): make I18NHtmlParser provider AoT-compliant ( #15980 )
...
PR Close #15980
2017-04-19 22:46:40 -05:00
Alex Eagle
11b0213d20
fix(compiler): suppress another closure warning ( #16137 )
...
closure compiler warns in generated .ngfactory.ts files:
```
WARNING - property createInternal already defined on superclass module$contents$..$core$src$linker$ng_module_factory_NgModuleInjector; use @override to override it
```
PR Close #16137
2017-04-19 22:46:32 -05:00
Alex Eagle
da668848c9
fix(core): distribute externs for testability API ( #16179 )
...
Workaround for #11119
PR Close #16179
2017-04-19 22:46:11 -05:00
Miško Hevery
5293794316
fix: turn on nullability in the code base.
2017-04-18 12:07:33 -07:00
Miško Hevery
728c9d0632
fix(platform-browser): Update types for TypeScript nullability support
...
Closes #15898
2017-04-18 12:07:33 -07:00
Miško Hevery
01d93f3af8
fix(upgrade): Update types for TypeScript nullability support
...
Closes #15897
2017-04-18 12:07:33 -07:00
Miško Hevery
a0d124bd91
fix(router): relax nullability requirements
2017-04-18 12:07:33 -07:00
Miško Hevery
57bc245cb4
fix(forms): Update types for TypeScript nullability support
...
This reverts commit 6d930d2fc5
.
2017-04-18 12:07:33 -07:00
Miško Hevery
bc431888f3
fix(router): Update types for TypeScript nullability support
...
This reverts commit ea8ffc9841
.
2017-04-18 12:07:33 -07:00
Miško Hevery
ec028b8109
fix(http): Update types for TypeScript nullability support
...
This reverts commit 268884296a
.
2017-04-18 12:07:33 -07:00
Victor Berchet
014594fe8f
feat: add support for TS 2.3
2017-04-18 08:28:55 -07:00
Victor Berchet
3c8a61e40c
feat: add support for TS 2.2
2017-04-18 08:28:55 -07:00
Tobias Bosch
2f442062d2
fix(benchpress): chrome - prevent trace buffer overflow
2017-04-18 08:28:31 -07:00
Chuck Jazdzewski
f21ff904c2
fix(language-service): respect baseUrl compiler option
...
Fixes #15974
2017-04-17 14:36:49 -07:00
Chuck Jazdzewski
38a7e0d1c7
fix(compiler): ignore calls to unresolved symbols in metadata
...
This only shows up in the language service. Calls to symbols
that are not resolve resulted in null instead of being resolved
causing the language service to see exceptions when the null
was not expected such as in the animations array.
Fixes #15969
2017-04-17 14:36:08 -07:00
Tobias Bosch
90814e4449
feat(upgrade): fixes for allow setting the angularjs lib at runtime
...
- always have a value for `angular`, even if no angular is on the page
- use `const` instead of `function` to allow to export a variable `module`
without breaking tsickle / closure.
2017-04-17 14:35:55 -07:00
Tobias Bosch
e927aeae86
feat(upgrade): allow setting the angularjs lib at runtime ( #15168 )
...
Readds 8ad464d90e
.
2017-04-17 14:35:55 -07:00
Randall Koutnik
a77b126d72
fix(compiler): Inform user where Quoted error was thrown
2017-04-17 10:19:09 -07:00
Victor Berchet
82417b3ca5
fix(router): prevent `RouterLinkActive` from causing an infinite CD loop
...
fixes #15825
2017-04-17 10:15:44 -07:00
Victor Berchet
5b141fbf27
fix(compiler): support `<ng-container>` whatever the namespace
...
fixes #14257
2017-04-17 10:14:15 -07:00
Tobias Bosch
268884296a
Revert "fix(http): Update types for TypeScript nullability support"
...
This reverts commit c36ec9bf60
.
Broke in G3.
2017-04-17 09:56:09 -07:00
Tobias Bosch
ea8ffc9841
Revert "fix(router): Update types for TypeScript nullability support"
...
This reverts commit 56c46d70f7
.
Broke in G3.
2017-04-17 09:56:09 -07:00
Tobias Bosch
6d930d2fc5
Revert "fix(forms): Update types for TypeScript nullability support"
...
This reverts commit 6649743a2d
.
Broke in G3.
2017-04-17 09:56:09 -07:00
Chuck Jazdzewski
2ddf3bcdd1
fix(language-service): look for type constructors on canonical symbol
2017-04-17 09:49:31 -07:00
Chuck Jazdzewski
0a3a9afe58
fix(language-service): infer correct type of `?.` expressions
...
Fixes #15885
2017-04-17 09:48:52 -07:00
Chuck Jazdzewski
5a88d2f68b
fix(language-service): only use canonical symbols
...
Language service was treating some alias TypeScript symbols as if
they where the canonical symbol. If the symbol in scope is an alias
of another symbol the symbol should be converted to the canonical
symbol.
2017-04-17 09:24:31 -07:00
Miško Hevery
6649743a2d
fix(forms): Update types for TypeScript nullability support
...
This reverts commit 2e47a0d19f
.
2017-04-14 15:10:26 -07:00
Miško Hevery
56c46d70f7
fix(router): Update types for TypeScript nullability support
2017-04-14 14:31:17 -07:00
Miško Hevery
c36ec9bf60
fix(http): Update types for TypeScript nullability support
2017-04-14 13:53:25 -07:00
Tobias Bosch
86396a43e9
Revert "fix(compiler): ignore calls to unresolved symbols in metadata ( #15970 )"
...
This reverts commit ce47d33cd9
.
2017-04-14 11:20:12 -07:00
Tobias Bosch
590e68c251
Revert "feat(upgrade): allow setting the angularjs lib at runtime ( #15168 )"
...
This reverts commit 8ad464d90e
.
Breaks G3.
2017-04-14 11:20:12 -07:00
Victor Berchet
bd704c90dd
fix(compiler): fix build error in xliff2
2017-04-14 11:20:12 -07:00
Victor Berchet
ea4afebeb9
refactor(router): drop the `InternalRoute` interface
2017-04-14 09:08:13 -07:00
Dzmitry Shylovich
886cca028f
refactor(router): misc refactoring
2017-04-14 09:08:13 -07:00
Olivier Combe
4054055d0d
feat(compiler): add source files to xmb/xliff translations ( #14705 )
...
Fixes #14190
2017-04-14 09:06:25 -07:00
Panuruj Khambanonda (PK)
09c4cb2540
feat(compiler): Implement i18n XLIFF 2.0 serializer ( #14185 )
...
- Ensure that the result passes OASIS XLIFF 2.0 schema validation
- Use <ph/> for self-closing placeholder tags
- Use <pc></pc> for other placeholder tags
- Check for the correct XLIFF file version
- Add ICU support
fixes #11735
2017-04-14 09:05:00 -07:00
Victor Savkin
8ad464d90e
feat(upgrade): allow setting the angularjs lib at runtime ( #15168 )
...
This PR adds an ability to reset the angularjs library, which is often needed when Angular
is loaded lazily using RequireJS.
2017-04-14 09:04:28 -07:00
Victor Berchet
cb5a7efa91
fix(core): key-value differ changes iteration ( #15968 )
...
fixes #14997
2017-04-14 09:03:16 -07:00
Chuck Jazdzewski
ce47d33cd9
fix(compiler): ignore calls to unresolved symbols in metadata ( #15970 )
...
This only shows up in the language service. Calls to symbols
that are not resolve resulted in null instead of being resolved
causing the language service to see exceptions when the null
was not expected such as in the animations array.
Fixes #15969
2017-04-14 09:02:32 -07:00
Tobias Bosch
2e47a0d19f
Revert "fix(forms): Update types for TypeScript nullability support ( #15859 )" ( #15977 )
...
This reverts commit 6a2e08d0a8
.
2017-04-13 18:03:42 -07:00
Miško Hevery
6a2e08d0a8
fix(forms): Update types for TypeScript nullability support ( #15859 )
2017-04-13 17:14:08 -07:00
Victor Berchet
fdb3f26448
refactor(compiler): cleanup ( #15960 )
2017-04-13 11:56:00 -07:00
Adrien Boullé
9394835db4
fix(platform-server): handle innerText ( #15818 )
2017-04-13 11:54:57 -07:00
Hans Larsen
3ad0cc5736
release: cut the 4.1.0-beta.1 release
2017-04-12 14:39:22 -07:00
Miško Hevery
540581da3e
fix(language-service): Update types for TypeScript nullability support
2017-04-12 11:36:19 -07:00
Miško Hevery
6f5fccfeb7
fix: Update types for TypeScript nullability support in examples
2017-04-12 11:36:19 -07:00
Miško Hevery
14669f20bf
fix(benchpress): Update types for TypeScript nullability support
2017-04-12 11:36:19 -07:00
Miško Hevery
38d75d410e
feat(animations): Update types for TypeScript nullability support
...
Closes #15870
2017-04-11 18:13:52 -07:00
Victor Berchet
a487563768
fix(router): fix query param parsing
2017-04-11 11:15:11 -07:00
Victor Berchet
0ab04bd62c
refactor(router): cleanup & simplifications
2017-04-11 11:15:11 -07:00
Marc Laval
46ce3317c3
test(router): enable running the campaign in non-ES6 browsers
...
Closes #15806 .
2017-04-10 15:43:42 -07:00
Victor Berchet
83527fd4fb
test(router): test preloading when a module is already loaded
2017-04-10 16:35:47 -06:00
Dzmitry Shylovich
6d12aa978d
fix(router): the preloader use the module from the loaded config
2017-04-10 16:35:47 -06:00
Chuck Jazdzewski
258d5392d5
fix(language-service): detect when there isn't a tsconfig.json
...
Fixes #15874
2017-04-10 16:01:05 -06:00
Miško Hevery
09d9f5fe54
fix(compiler): Update types for TypeScript nullability support
2017-04-10 15:26:33 -06:00
Miško Hevery
d8b73e4223
fix(common): Update types for TypeScript nullability support
2017-04-10 15:26:33 -06:00
Chuck Jazdzewski
bde9771991
fix(language-service): parse extended i18n forms
2017-04-04 15:34:12 -06:00
Chuck Jazdzewski
fe0d02fc47
fix(language-service): initialize static reflector correctly
...
Fixes #15768
2017-04-04 15:00:46 -06:00
Ethan Veres
7b005aadc1
style(router): fix typo in router preloader method
2017-04-04 14:12:45 -06:00
Chuck Jazdzewski
7764c5c697
fix(language-service): avoid throwing exceptions when reporting metadata errors
2017-04-04 14:11:51 -06:00
Chuck Jazdzewski
5fbb0d050c
fix(language-service): resolve any parameter types to any result
2017-03-31 11:37:39 -07:00
Chuck Jazdzewski
71a8627c5d
fix(language-service): improve resilience to incomplete information
2017-03-31 11:37:39 -07:00
Tobias Bosch
8ef621ad2a
fix(compiler): fix inheritance for AOT with summaries ( #15583 )
...
Allows to inherit ctor args, lifecycle hooks and statics from a class
in another compilation unit.
Will error if trying to inherit from a class in another compilation unit
that has an `@Component` / `@Directive` / `@Pipe` / `@NgModule`.
2017-03-30 14:51:29 -07:00
Victor Berchet
6388768d73
release: cut the 4.1.0-beta.0 release
2017-03-29 16:55:47 -07:00
Tobias Bosch
14fd78fd85
fix(core): fix inheritance in JIT mode for TS 2.1 ( #15599 )
...
Fixes #15502
2017-03-29 16:14:51 -07:00
Chuck Jazdzewski
a9321b1387
fix(language-service): correctly determine base members of types ( #15600 )
...
Fixes #15460
2017-03-29 16:14:37 -07:00
Dzmitry Shylovich
19cb503531
docs(http): remove deprecated stuff and outdated plunkrs ( #15598 )
2017-03-29 15:11:59 -07:00
Dzmitry Shylovich
9c77a7cdaf
fix(compiler): throw when a component defines both template and templateUrl ( #15572 )
...
Closes #15566
2017-03-29 10:26:48 -07:00
Victor Berchet
d58a242fe7
refactor(router): cleanup & simplification ( #15436 )
2017-03-29 09:44:04 -07:00
Miško Hevery
910c0d9ee7
fix(core): Update types for TypeScript nullability support ( #15472 )
2017-03-29 09:34:45 -07:00
Chuck Jazdzewski
331b9f6425
fix(language-service): don't require `reflect-metadata` module to be provided ( #15569 )
...
Fixes #15568
2017-03-29 09:34:21 -07:00
Shai Reznik
49162784a8
docs(core): fix API docs for `Injector.get`
2017-03-28 16:57:22 -07:00
Dzmitry Shylovich
0c36f2353d
perf(router): don't create new serializer every time UrlTree.toString is called ( #15565 )
2017-03-28 16:17:48 -07:00
Matias Niemelä
a580f8c61f
fix(animations): make sure style calculations are not computed too early ( #15540 )
...
Closes #15507
2017-03-28 16:07:49 -07:00
Dzmitry Shylovich
f368381d12
fix(router): should run CanActivate after CanDeactivate guards
...
Closes #14059
Closes #15467
2017-03-28 15:51:33 -07:00
Dzmitry Shylovich
7c2f795ea6
refactor(router): fix tests structure
2017-03-28 15:51:17 -07:00
Victor Berchet
93d48f1d89
fix(core): fix the key/value differ ( #15539 )
...
fixes #15457
2017-03-28 15:50:11 -07:00
Diego Barahona
aa16ccda79
fix(core): check for undefined on normalizeDebugBindingValue ( #15503 )
...
DebugServices is parsing false atributes values incorrectly.
Parse5 expects a string value for attributes, but currently boolean is being sent.
Closes #15494
2017-03-28 13:33:07 -07:00
Chuck Jazdzewski
6269d28bb0
fix(language-service): improve performance of `updateModuleAnalysis()` ( #15543 )
2017-03-28 13:32:46 -07:00
Chuck Jazdzewski
d438b88f19
fix(compiler): ignore errors when evaluating base classes ( #15560 )
...
Fixes #15536
2017-03-28 13:32:34 -07:00
Dzmitry Shylovich
8e03f65645
refactor(router): improve flatten fn
...
closes #15505
2017-03-28 09:39:20 -07:00