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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45735895/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 04:49:26  来源:igfitidea点击:

How to design circle progress bar in ionic 3?

angulartypescriptionic-frameworkionic3

提问by Jamal Ahmad

how to create circular progress bar in ionic 3. i am new in ionic. i already tried to install

如何在 ionic 3 中创建圆形进度条。我是 ionic 新手。我已经尝试安装

npm install jquery-circle-progress

package link here

包链接在这里

it installed perfect but i am confuse that how to use it in ionic? please guide me.Thanks in advance

它安装完美,但我很困惑如何在离子中使用它?请指导我。提前致谢

Update:

更新:

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

回答by Sampath

Update: 06-11-2017

更新:06-11-2017

This is not working with the latest version (1.2.0). But it is working fine with npm install [email protected] --save.

这不适用于最新版本 ( 1.2.0)。但它与npm install [email protected] --save.

Working git repo:

工作 git 仓库

Another Answer is here

另一个答案在这里

Old Answer:

旧答案:

You can'tuse above mentioned jquery progress barwith Ionic.You have to use an Angular module for that.

不能将上述jquery 进度条与 Ionic 一起使用。为此您必须使用 Angular 模块。

Here is the one which you can use.

这是您可以使用的一种。

Demo

演示

Git Repo

Git 仓库

enter image description here

在此处输入图片说明

Steps:

脚步:

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

After that you need to import the RoundProgressModulein your moduleas shown below:

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

import {NgModule} from '@angular/core';
import {RoundProgressModule} from 'angular-svg-round-progressbar';

@NgModule({
  imports: [RoundProgressModule]
})
export class YourModule {};

Update:

更新:

import { RoundProgressComponent } from 'angular-svg-round-progressbar'; 

       @NgModule({ 
           declarations: [ ProfilePage, ],
           imports: [IonicPageModule.forChild(ProfilePage),
                     RoundProgressModule],
           }) 

           export class ProfilePageModule {}