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
DebugServices is parsing false atributes values incorrectly.
Parse5 expects a string value for attributes, but currently boolean is being sent.
Closes#15494
This has the side effect of allowing `@Input` and `@ContentChild`
on the same property if the query is static (see the bug description
for details).
Fixes#15417
`ngc` would look for flat module resources relative to the flat module index.
`ngc` now looks for flat module resources relative to the `.d.ts` file that declarates
the component.
Fixes#15221
PR Close#15367
This change reduces the amount of generated code by only adding `log`
calls for elements and text nodes.
We need the `log` calls to allow users to jump to the right place
in the template via source maps. However, we only need it for element
and text nodes, but not for directives, queries, … as for them we
first locate the corresponding element or text node.
Related to #15239
PR Close#15350
This is needed to support the corner cases:
- usage of a `ComponentFactory` that was created on the fly via `Compiler`
- overwriting of the `NgModuleRef` that is associated to a
`ComponentFactory` by the `ComponentFactoryResolver` from
which it was read.
Fixes#15241
Previously, a pipe that returned a `WrappedValue` would force the change
of the next bound property, independent of the binding in which the pipe
was used.
Now only the binding in which the `WrappedValue` is used will be assumed
as changed.
Fixes#15116
PR Close#15257
Closure compiler is very sensitive to top level function calls.
This commit makes the function calls `createComponentFactory`
and `createRendererTypeV2` logic-less.
Fixes#15181
PR Close#15214
E.g. for a component like this:
```
@Component({
template: ‘<ng-content select=“child”></ng-content>’
})
class MyComp {
@Input(‘aInputName’)
aInputProp: string;
@Output(‘aEventName’)
aOuputProp: EventEmitter<any>;
}
```
the `ComponentFactory` will now contain the following:
- `inputs = {aInputProp: ‘aInputName’}`
- `outputs = {aOutputProp: ‘aOutputName’}`
- `ngContentSelectors = [‘child’]`