I seem to be unable to correctly import ng-file-upload in my new Angular 6.1.6-based project.
As soon as I add this to app.module.ts:
import {ngFileUpload} from 'ng-file-upload';
I get this:
Uncaught ReferenceError: angular is not defined
at Object../node_modules/ng-file-upload/dist/ng-file-upload-all.js (ng-file-upload-all.js:446)
at __webpack_require__ (bootstrap:76)
at Object../node_modules/ng-file-upload/index.js (index.js:1)
at __webpack_require__ (bootstrap:76)
at Object../src/app/app.module.ts (app.component.ts:20)
at __webpack_require__ (bootstrap:76)
at Object../src/main.ts (environment.ts:15)
at __webpack_require__ (bootstrap:76)
at Object.0 (main.ts:16)
at __webpack_require__ (bootstrap:76)
I seem to be unable to correctly import
ng-file-upload
in my new Angular 6.1.6-based project.As soon as I add this to
app.module.ts
:I get this:
What else must be done to import it correctly?