closes#11145
Also rename `CompileIdentifierMetadata.runtime` into `CompileIdentifierMetadata.reference`.
Also remove `CompileIdentifierMetadata.equalsTo` as
now it is enough to just check the `reference` fields for equality.
fixes#5390
Before the change:
// original CSS
:host .foo .bar {...}
.foo .bar {...}
// translated to
[_nghost-shh-2] .foo .bar {...}
.foo[_ngcontent-shh-2] .bar[_ngcontent-shh-2] {...}
Note that `.foo` and `.bar` where not scoped and would then apply to nested components.
With this change those selectors are scoped (as they are without `:host`).
You can explicitly apply the style to inner component by using `>>>` or `/deep/`: `:host >>> .foo`
BREAKING CHANGE:
Exceptions are no longer part of the public API. We don't expect that anyone should be referring to the Exception types.
ExceptionHandler.call(exception: any, stackTrace?: any, reason?: string): void;
change to:
ErrorHandler.handleError(error: any): void;
BREAKING CHANGES:
- `#` and `var` are not supported any more in expressions, use `let`,
- `var-<name>` could not be used any more on templates, use `let-<name>`,
- `var-<name>` could not be used any more to create a reference, use `ref-<name>`.
BREAKING CHANGE: previously deprecated @Component.directives and @Component.pipes support was removed.
All the components and pipes now must be declarated via an NgModule. NgModule is the basic
compilation block passed into the Angular compiler via Compiler#compileModuleSync or #compileModuleAsync.
Because of this change, the Compiler#compileComponentAsync and #compileComponentSync were removed as well -
any code doing compilation should compile module instead using the apis mentioned above.
Lastly, since modules are the basic compilation unit, the ngUpgrade module was modified to always require
an NgModule to be passed into the UpgradeAdapter's constructor - previously this was optional.
Often it is useful to test a component without rendering certain directives/components
in its template because these directives require some complicated setup.
You can do that by using NO_ERRORS_SCHEMA.
TestBed.configureTestingModule({
schemas: [NO_ERRORS_SCHEMA]
});
This would disable all schema checks in your tests.
BREAKING CHANGE: Animations defined using an at-symbol prefix that are
not property bound are now invalid.
```html
<!-- this is now invalid -->
<div @flip="flipState"></div>
<!-- change that to -->
<div [@flip]="flipState"></div>
```
BREAKING CHANGE: Animations that are not bound using the at-symbol
prefix using `animate-` must now be preixed using `bind-animate-`.
```html
<!-- this is now invalid -->
<div animate-flip="flipState"></div>
<!-- is valid now -->
<div bind-animate-flip="flipState"></div>
```
Closes#10825
Remove TestComponentBuilder, addProviders, and withProviders. These
were deprecated in rc5 - see the changelog for update information.
Note - this does not actually remove the functions, but makes them
internal only. They will be removed from the codebase entirely
at a later time.
Closes#9751
BREAKING CHANGE:
These forms of providers are no longer accepted:
bind(MyClass).toFactory(...)
new Provider(MyClass, toFactory: ...)
We now only accept:
{provider: MyClass, toFactory: ...}
This fixes an issue where `TestBed.overrideComponent(MyComp, {})`
would remove some properties including `providers` from the component.
This was due to the override not properly dealing with getter fields
on subclasses.