Error trying to install "ngx-input-file" in Angular 6

2

I try to install the library ngx-input-file .

npm install ngx-input-file --save

I import the 2 libraries to app.module.ts like this:

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { InputFileConfig, InputFileModule } from 'ngx-input-file';

I add BrowserAnimationsModule to import and it works correctly, but by adding InputFileModule.forRoot (config), to import I get the following error:

  

Failed to compile.

     

./ node_modules / ngx-input-file / fesm5 / ngx-input-file.js   Module not found: Error: Can not resolve '@ angular / material / button' in 'C: \ wamp64 \ www \ webapp \ node_modules \ ngx-input-file \ fesm5'

    
asked by Pablo Contreras 06.10.2018 в 18:30
source

1 answer

5

Surely what you need is to install the package @ angular / material. Try running this command line in the project:

npm install --save @angular/material
npm install --save @angular/cdk

Good luck!

    
answered by 06.10.2018 / 18:41
source