angular - 如何在ionic 3中设计圆形进度条?

标签 angular typescript ionic-framework ionic3

如何在 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

enter image description here

步骤:

npm install angular-svg-round-progressbar --save

之后您需要在您的模块中导入RoundProgressModule,如下所示:

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 {}

关于angular - 如何在ionic 3中设计圆形进度条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45735895/

相关文章:

html - React - Material 用户界面 : How to remove scrollbar from table

typescript - eslint 提示 typescript 的路径别名

angular - 类型错误 : Cannot read property 'valid' of undefined

angular - 我应该在注入(inject)的 Angular 服务上使用 readonly 而不是将它们公开吗?

angular - Angular 2 中的导入语句

javascript - ionic href 不工作

ionic-framework - 如何设置IONIC4设置选项卡背景透明?

angular - Angular 2 中的字符串插值及其动态性

typescript - 将相交类型封装到接口(interface)中

ionic-framework - keystore 文件不存在。无法获取 SHA1 key