Ngx-bootstrap: 'rating' is not a known element:

Created on 12 Sep 2016  路  8Comments  路  Source: valor-software/ngx-bootstrap

very odd, I am getting the error of:

Unhandled Promise rejection: Template parse errors:
'rating' is not a known element:
1. If 'rating' is an Angular component, then verify that it is part of this module.
2. If 'rating' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("ss="list-group">
                        <li class="list-group-item">
                            [ERROR ->]<rating></rating>

I did import the modules

import {DropdownModule} from 'ng2-bootstrap/ng2-bootstrap';
import {RatingModule} from 'ng2-bootstrap/ng2-bootstrap';

and drop down works fine... but yet RatingModule generates an error... mmm

any ideas?

ver 1.1.2

Regards,

Sean

Angular 2 Kitchen sink: http://ng2.javascriptninja.io
and source@ https://github.com/born2net/ng2Boilerplate

Most helpful comment

will open bug as rating should not force ngModel in selector for reactive forms

All 8 comments

Please show us your complete ngmodule definition and the template which throws the error.

The rating component needs an ngModel binding.

haaaa.. it must? seems odd, as I was going to use it in reactive form with no ngModel (manual updates), trying now

I'm not 100% sure but the rating definition says: selector: 'rating[ngModel]' :)

ya that's a problem for me, as I am using

[formGroup]="contGroup"

for reactive form and now will get an error of:

EXCEPTION: Error in http://localhost:9089/src/comps/app1/adnet/network/AdnetNetworkTargetProps.html:13:36 caused by: 
      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using
      formGroup's partner directive "formControlName" instead.  Example:


    <div [formGroup]="myGroup">
      <input formControlName="firstName">

mmm

:/

will open bug as rating should not force ngModel in selector for reactive forms

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haisaco picture haisaco  路  3Comments

RolfVeinoeSorensen picture RolfVeinoeSorensen  路  3Comments

webdev48 picture webdev48  路  3Comments

ctrl-brk picture ctrl-brk  路  3Comments

PascalHonegger picture PascalHonegger  路  3Comments