I was implementing mat-select and mat-option for one of the requirement but seems like it conflicts with some of the existing functionalities.
Very first, can anyone help me if I can get @angular/material in angular 4, the one which I installed has version 6.4.7. Is there any version supporting angular 4.0.0 because currently we have no plan to upgrade our application to angular 6.
Once I installed angular/material with below command :
npm install --save @angular/material @angular/cdk @angular/animations
it stated throwing below error:
node_modules/@angular/material/core/typings/line/line.d.ts (23,55): Type 'ElementRef' is not generic.
node_modules/@angular/cdk/portal/typings/portal.d.ts (50,39): ',' expected.
node_modules/@angular/cdk/portal/typings/portal.d.ts (50,41): Type parameter name cannot be 'any'
node_modules/@angular/cdk/portal/typings/dom-portal-outlet.d.ts (34,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
node_modules/@angular/material/bottom-sheet/typings/bottom-sheet-container.d.ts (23,24): Generic type 'MatBottomSheetConfig<D, any>' requires 2 type argument(s).
Looks like this is version issue, but can anyone guide me what would be the solution for this?
Adding my code in this question:
shared.module.ts file
import { MatFormFieldModule, MatInputModule, MatSelectModule } from '@angular/material';
@NgModule({
imports: [ ....,
MatInputModule,
MatFormFieldModule,
MatSelectModule,
...]
exports: [ ....,
MatInputModule,
MatFormFieldModule,
MatSelectModule,
....]
app.module.ts file
import { SharedModule } from './shared';
@NgModule({
imports: [ ...,
SharedModule,
....]
Actually it does not even hit the code, as soon as I install angular/material and angular/cdk my ng build fails with above error.