Looking for collaborators!

If you interested in helping to build neoui-ng, check out this on GitHub

Here's how you use it in angularJS

<s-progress auto-start="true" class="md-progress-ios" controller="progress"> </s-progress>

angular .module( "demo.progress", [ "$ui.progress" ] ) .controller( "progressContorller", [ "$scope", function( $scope ) { $scope.stop = function() { $scope.progress.done(); } } ] );


Attributes

=controller

null

进度条控制器, See the jQuery part

@auto-show

false

自动开始进度条



Classes

.md-progress-global

进度条置顶

.md-progress-ios

IOS 风格

Use it in jQuery

$( selector ).progress( options )

<div class="md-progress"> </div>

require( [ "ui/progress/progress" ], function() { var progress = $( ".md-progress" ).progress().start(); } );

Options

seed

0.05

随机值种子, 值越大, 增量越快

speed

800

速度值, 单位毫秒, 越小越快

max

0.99123

未完成时最大值

template

<div class='bar'><div></div></div><div class='spinner'><div></div></div>

进度条模板

selector4bar

".md-progress-bar"

Selector of the progress bar

selector4icon

".md-progress-spinner"

Selector of the spinner icon

render

function

进度条状态更新时调用, 控制进度条展示

$( ".md-progress" ).progress( { render: function( status ) { this .$node .find( this.settings.selector4bar ) .css( { "width": status * 100 + "%", "-webkit-transition": "all .2s ease-out", "-moz-transition": "all .2s ease-out", "-ms-transition": "all .2s ease-out", "-o-transition": "all .2s ease-out", "transition": "all .2s ease-out", } ); } } );

Method

.start()
开始进度条
.done()
更新进度条进度
.inc()
进度条快进
.dec()
进度条快退
.set( status )

status

Number, 小于等于1

更新进度条进度