【发布时间】:2018-04-14 13:04:10
【问题描述】:
我为我的 ionic 项目阅读并安装了这个 Angular SVG round progressbar,但它对我不起作用,
https://github.com/crisbeto/angular-svg-round-progressbar
如何正确添加这个我的页面?请帮我解决这个问题 显示此错误
Error: Template parse errors: Can't bind to 'current' since it isn't a known property of 'round-progress'. 1. If 'round-progress' is an Angular component and it has 'current' input, then verify that it is part of this module. 2. If 'round-progress' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component禁止显示此消息。 3. 要允许任何属性,请将“NO_ERRORS_SCHEMA”添加到该组件的“@NgModule.schemas”。 ("
<round-progress [ERROR ->][current]="48" [max]="100"></round-progress> </ion-content> ")
谢谢
我添加了我的页面 home.html
<round-progress
[current]="current"
[max]="max"
[color]="'#45ccce'"
[background]="'#eaeaea'"
[radius]="125"
[stroke]="20"
[semicircle]="true"
[rounded]="true"
[clockwise]="false"
[responsive]="false"
[duration]="800"
[animation]="'easeInOutQuart'"
[animationDelay]="0"
(onRender)="doSomethingWithCurrentValue($event)"></round-progress>
home.ts
import { Component,NgModule } from '@angular/core';
import {RoundProgressModule} from 'angular-svg-round-progressbar';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-home',
templateUrl: 'home.html',
})
@NgModule({
imports: [RoundProgressModule]
})
export class HomePage {
constructor(public navCtrl: NavController,private _config: RoundProgressConfig) {
_config.setDefaults({
color: '#f00',
background: '#0f0'
});
}
}
【问题讨论】:
标签: angular typescript ionic-framework ionic2 ionic3