app.module.ts issue
Closed this issue · 3 comments
to import lib of node into app.module.ts wrong written like below
import { Ng2OwlCarouselComponent } from "ng2.owl.carousel"
i have solved by adding like these one
https://drive.google.com/file/d/1Qm0ESA66jTolX7ILlAvugqizFD4JI0vA/view?usp=drivesdk
so please correct it on
https://www.npmjs.com/package/ng2-owl-carousel2
still i am getting error below in console:
Uncaught Error: Unexpected directive 'Ng2OwlCarouselComponent' imported by the module 'AppModule'. Please add a @NgModule annotation.
at syntaxError (eval at 348 (vendor.js:334), :1913:34)
at eval (eval at 348 (vendor.js:334), :15617:44)
at Array.forEach ()
at CompileMetadataResolver.getNgModuleMetadata (eval at 348 (vendor.js:334), :15600:49)
at JitCompiler._loadModules (eval at 348 (vendor.js:334), :27045:70)
at JitCompiler.compileModuleAndComponents (eval at 348 (vendor.js:334), :27018:36)
at JitCompiler.compileModuleAsync (eval at 348 (vendor.js:334), :26947:37)
at PlatformRef.bootstrapModuleWithZone (eval at 0 (vendor.js:7), :4740:25)
at PlatformRef.bootstrapModule (eval at 0 (vendor.js:7), :4726:21)
at Object.eval (eval at (app.js:1254), :9:53)
at eval (eval at (app.js:1254), :11:30)
at Object. (app.js:1254)
at webpack_require (polyfills.js:53)
at Object. (app.js:2856)
at webpack_require (polyfills.js:53)
at webpackJsonpCallback (polyfills.js:24)
at app.js:1
syntaxError @ VM56848:1913
(anonymous) @ VM56848:15617
CompileMetadataResolver.getNgModuleMetadata @ VM56848:15600
JitCompiler._loadModules @ VM56848:27045
JitCompiler.compileModuleAndComponents @ VM56848:27018
JitCompiler.compileModuleAsync @ VM56848:26947
PlatformRef.bootstrapModuleWithZone @ core.es5.js?0445:4740
PlatformRef.bootstrapModule @ core.es5.js?0445:4726
(anonymous) @ main.ts?7d64:10
(anonymous) @ main.ts?7d64:10
(anonymous) @ app.js:1254
webpack_require @ polyfills.js:53
(anonymous) @ app.js:2856
webpack_require @ polyfills.js:53
webpackJsonpCallback @ polyfills.js:24
(anonymous) @ app.js:1
issue in html code also
VM69862:1913 Uncaught Error: Template parse errors:
'carousel-item' is not a known element:
-
If 'carousel-item' is an Angular component, then verify that it is part of this module.
-
If 'carousel-item' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
[options]="carouselOptions">[ERROR ->]<carousel-item *ngFor="let item of photos">
:1913:34) at TemplateParser.parse (eval at 348 (vendor.js:334), :13010:19) at JitCompiler._compileTemplate (eval at 348 (vendor.js:334), :27213:39) at eval (eval at 348 (vendor.js:334), :27132:62) at Set.forEach () at JitCompiler._compileComponents (eval at 348 (vendor.js:334), :27132:19) at eval (eval at 348 (vendor.js:334), :27019:19) at Object.then (eval at 348 (vendor.js:334), :1902:148) at JitCompiler._compileModuleAndComponents (eval at 348 (vendor.js:334), :27018:26) at JitCompiler.compileModuleAsync (eval at 348 (vendor.js:334), :26947:37) at PlatformRef_._bootstrapModuleWithZone (eval at 0 (vendor.js:7), :4740:25) at PlatformRef_.bootstrapModule (eval at 0 (vendor.js:7), :4726:21) at Object.eval (eval at (app.js:1254), :9:53) at eval (eval at (app.js:1254), :11:30) at Object. (app.js:1254) at __webpack_require__ (polyfills.js:53) at Object. (app.js:2856) at __webpack_require__ (polyfills.js:53) at webpackJsonpCallback (polyfills.js:24) at app.js:1