Version 10.0.0 is major relase that span the entire platform which includes Material, CLI and framework.
Having 2 major releases within year angular team kept the framework synchronized with latest version of Javascript and Typescript ecosystem.
Solution Style
tsconfig.json Files
tsconfig.json
was introduced by TypeScript 3.9.tsconfig.base.json
is introduced, to have tsconfig.json
at root. {
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./e2e/tsconfig.json"
},
{ // added newly
"path": "./projects/core/tsconfig.lib.json"
},
{ // added newly
"path": "./projects/core/tsconfig.spec.json"
}
]
}
esm5
and fesem5
distributions..browserlistrc
in your app, but fall back to browserlist if not found. The ng update
command will rename the file for you. Default browser support for Baidu, Opera, Samsung, Android Chrome removed.ModuleWithProviders
without Generic Type.
metadata.json
is not required, Angular checks the generic type for type validation. @NgModule({...})
export class SomeModule {
static forRoot(): ModuleWithProviders<SomeModule> {
return {
ngModule: SomeModule,
providers: [...]
};
}
}
Angular Decorator
or Dependency Injection
then we need to decorate the base classes also. @Directive()
export abstract class AbstractSome {
constructor(@Inject(LOCALE_ID) public locale: string) {}
}
@Component({
selector: 'app-some',
template: 'Locale: ',
})
export class SomeComponent extends AbstractSome {}
Here Angular 10 will throw error
The component SomeComponent inherits its constructor from AbstractSome, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of AbstractSome's constructor. Either add a @Directive decorator to AbstractSome, or add an explicit constructor to SomeComponent.
mat-date-range-input
and mat-date-range-picker
components.ng new --strict
.any