kutlugsahin / ngx-smooth-dnd

angular wrapper for smooth-dnd
165 stars 30 forks source link

smooth-dnd-draggable' is not a known element #18

Closed ghost closed 6 years ago

ghost commented 6 years ago

I have followed all the necessary steps and it compiles successfully. But in the browser it shows as follows

Uncaught Error: Template parse errors:
'smooth-dnd-draggable' is not a known element:
1. If 'smooth-dnd-draggable' is an Angular component, then verify that it is part of this module.
2. If 'smooth-dnd-draggable' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("v class="simple-page">
        <smooth-dnd-container (drop)="onDrop($event)">            
          [ERROR ->]<smooth-dnd-draggable *ngFor="let item of items">
            <div class="draggable-item">
          "): ng:///AppModule/AppComponent.html@4:10
'smooth-dnd-container' is not a known element:
1. If 'smooth-dnd-container' is an Angular component, then verify that it is part of this module.
2. If 'smooth-dnd-container' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
    <div>
      <div class="simple-page">
        [ERROR ->]<smooth-dnd-container (drop)="onDrop($event)">            
          <smooth-dnd-draggable *ngFor="le"): ng:///AppModule/AppComponent.html@3:8
    at syntaxError (compiler.js:1021)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:14830)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:24018)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:24005)
    at compiler.js:23948
    at Set.forEach (<anonymous>)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (compiler.js:23948)
    at compiler.js:23858
    at Object.then (compiler.js:1012)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:23857)

What should i do to fix this issue?

kutlugsahin commented 6 years ago

Have you add NgxSmoothDnDModule to the imports of your app module?