webcat12345 / ngx-ui-switch

Angular UI Switch component
https://webcat12345.github.io/ngx-ui-switch/demo/
MIT License
110 stars 68 forks source link

problem with angular 5 #205

Closed itcozum closed 6 years ago

itcozum commented 6 years ago

Hi,

I'm getting the below error message from my angular 5.0 project.

Uncaught Error: Template parse errors: Can't bind to 'ngOutletContext' since it isn't a known property of 'ng-template'.

  1. If 'ngOutletContext' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
    <ng-template
        [ERROR ->][ngOutletContext]="{ item: model, index: index }"
        [ngTemplateOutlet]="template">
    "): ng:///TagInputModule/TagComponent.html@12:12

    Property binding ngOutletContext not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("div *ngSwitchCase="true" [attr.contenteditable]="editing">

    [ERROR ->]<ng-template
        [ngOutletContext]="{ item: model, index: index }"
        [ngTemplateOut"): ng:///TagInputModule/TagComponent.html@11:8
cmckni3 commented 6 years ago

Do you have CommonModule imported into your application/feature module?

import { CommonModule } from '@angular/common';

cmckni3 commented 6 years ago

Seems like this is unrelated to ngx-ui-switch. I am happy to help if you can provide a plunkr or sample code to reproduce it.