Destructuring of the form:
function foo({a, b}: {a?, b?} = {})
breaks strictNullChecks, due to the TypeScript bug https://github.com/microsoft/typescript/issues/10078.
This change eliminates usage of destructuring in function argument lists in cases where it would leak
into the public API .d.ts.
toString() from DefaultKeyValueDiffer is only used in tests and should not
be part of the production code. toString() methods from differs add
~ 0.3KB (min+gzip) to the production bundle size.
This PR fixes an issue where `query(':enter')` will only collect elements up until it an element that is found that isn't apart of the `:enter` query.
Closes#17440
This is required as e.g. `token` from `@Inject` is
accessed in string form via makeParamDecorator
but as a property in the `ReflectiveInjector`.
Closes#16889 as this is a more general fix.
`flush()` can now be used from within fakeAsync tests to simulate moving
time forward until all macrotask events have been cleared from the
event queue.
This fixes a flicker when transitioning from server rendered page to client rendered page in lazy loaded routes by waiting for the lazy loaded route to finish loading, assuming initialNavigation on the route is set to 'enabled'.
Fixes#15716
* refactor(core): provide error message in stack for reflective DI
Fixes#16355
* fix(compiler): make AOT work with `noUnusedParameters`
Fixes#15532
* refactor: use view engine also for `NgModuleFactory`s
This is a prerequisite for being able to mock providers
in AOTed code later on.
* docs(animations): fix links to `Component` animations
* docs(core): fix links to `ReflectiveInjector` methods
The `resolve` and other methods were moved from the
`Injector` to the `ReflectiveInjector`.
* docs(core): fix links to `Renderer`
The local links were assuming that that methods were on the
current document (e.g. `RootRenderer`), but they are actually
on the `Renderer` class.
* docs(router): fix links to methods
* docs(forms): fix links to methods
* docs(core): fix links to methods
* docs(router): fix API page links and an internal link
This also clarifies via a test
that we only update projected views when the view is created or destroyed,
but not when it is attached/detached/moved.
Fixes#15578
PR Close#16592
Previously a projected view was only dirty checked when the
component in which it was inserted was dirty checked.
This fix changes the behavior so that a view is also dirty checked if
the declaring component is dirty checked.
Note: This does not change the order of change detection,
only the fact whether a projected view is dirty checked or not.
Fixes#14321
- 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#9531Fixes#2413Fixes#15925
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
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