如何在 ionic 3中创建圆形进度条。我在 ionic 中是新手。
我已经尝试安装
npm install jquery-circle-progress
package link here
它安装完美,但我混淆了如何在 ionic 中使用它?
请指导我。谢谢
更新:
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ProfilePage } from './profile';
import { RoundProgressComponent } from 'angular-svg-round-progressbar';
@NgModule({
declarations: [ ProfilePage, ],
imports: [IonicPageModule.forChild(ProfilePage), ], })
export class ProfilePageModule {}
最佳答案
更新:2017年6月11日
这不适用于最新版本(1.2.0
)。但是使用npm install angular-svg-round-progressbar@1.1.1 --save
可以正常工作。
Working git repo:
另一个Answer is here
旧答案:
您不能与Ionic一起使用上述 jquery进度条。您必须为此使用Angular模块。
这是您可以使用的一种。
Demo
Git Repo
步骤:
npm install angular-svg-round-progressbar --save
之后,您需要将
RoundProgressModule
导入module
中,如下所示:import {NgModule} from '@angular/core';
import {RoundProgressModule} from 'angular-svg-round-progressbar';
@NgModule({
imports: [RoundProgressModule]
})
export class YourModule {};
更新:
import { RoundProgressComponent } from 'angular-svg-round-progressbar';
@NgModule({
declarations: [ ProfilePage, ],
imports: [IonicPageModule.forChild(ProfilePage),
RoundProgressModule],
})
export class ProfilePageModule {}