Can't bind to 'thick' since it isn't a known property of 'ng-progress'

自闭症网瘾萝莉.ら 提交于 2019-12-25 09:29:02

问题


I am trying to use this plugin to my app: https://github.com/MurhafSousli/ngx-progressbar#user-content-automagic-loading-bar

Its working fine, but when I run test on it, it fails with error:

Can't bind to 'thick' since it isn't a known property of 'ng-progress'.

app.module.ts

import { NgProgressCustomBrowserXhr, NgProgressModule } from 'ngx-progressbar';
@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
      NgProgressModule
    ],
    providers: [
      { provide: BrowserXhr, useClass: NgProgressCustomBrowserXhr },
    ],
    bootstrap: [AppComponent]
})
export class AppModule {
}

My app.component.html

<ng-progress [thick]="'true'" [showSpinner]="'false'"></ng-progress>

When I run npm run test

it fails with error:

Error: Template parse errors: 1. If 'ng-progress' is an Angular component, then verify that it is part of this module.

I am completely clueless why Test is only failing.


回答1:


Like I said in the comment, you forget to provide your component in your test.



来源:https://stackoverflow.com/questions/43996803/cant-bind-to-thick-since-it-isnt-a-known-property-of-ng-progress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!