2015-06-26 119 views
1

我已經創建了多個訂單,現在我要確認所有這些 訂單,但之前,除非所有的訂單得到確認我必須表明 進度條,並有顯示有序的狀態確認如何使用角度js來處理多個請求來實現進度條?

即假設我有確認10個訂單,然後1/10然後2/10然後3/10 ... 10/10在後臺確認訂單的狀態。

下面我有一個例子,但它並不滿足於需求..

angular.module("app", []) .controller("main", ['$scope', 
 
    function($scope) { 
 
     $scope.value = 10 
 
     $scope.items = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] }]) .directive('progressbar', [function() { 
 
     return { 
 
      restrict: 'A', 
 
      scope: { 
 
       'progress': '=progressbar' 
 
      }, 
 
      controller: function($scope, $element, $attrs) { 
 
       $element.progressbar({ 
 
        value: $scope.progress 
 
       }) 
 
    
 
       $scope.$watch(function() { 
 
        $element.progressbar({value: $scope.progress}) 
 
       }) 
 
      } 
 
     } }])

回答

0

我曾經用下面的模板:

您可以使用它:

http://victorbjelkholm.github.io/ngProgress/

+0

我不必使用外部庫...我在谷歌搜索,發現使用ng風格,我們可以實現進度條,但我是新的角度多數民衆贊成我不能夠實現它...幫助Appaieted –

+0

我不認爲angularjs提供了所有這些。您需要使用其他引導進度條。 – eronax59