2017-09-11 12 views
2

私はこのコードを角度1で書いてあります。角度2に変換する必要があります。 と他のすべての角度スクリプトは角度2で書かれています。角度1のスクリプトを角度2に変換する

(function() { 
'use strict'; 

angular 
    .module('myApp', []) 
    .controller('testCtrl', testCtrl); 

testCtrl.$inject = ['$scope']; 

function testCtrl($scope) { 
    $scope.categoryTypes = ['M-Trouser-Denim ','M-Trouser-Cotton','M-T shirt-Cotton','M-T shirt-Silk','M-T shirt-Polyester','M-Shirt-Cotton','M-Shirt-Silk','M-Shirt-Polyester','M-Short','Blouses','Skirts','Saree','FM-Trouser-Denim','FM-Trouser-Cotton','FM-T shirt-Silk','FM-T shirt-Polyester','FM-Shirt-Cotton','FM-Shirt-Silk','FM-Shirt-Polyester','FM-Short']; 

    $scope.clothCount = ['1','2','3','4','5','6','7','8','9','10'] 


    $scope.itemSet = { 
     item: [] 
    }; 

    $scope.addNewItem = function() { 
     $scope.itemSet.item.push({}); 
    }; 

    $scope.removeItem = function(index) { 
     $scope.itemSet.item.splice(index, 1); 
    }; 
}})(); 

+2

代わりの変換、なぜAngular2を学びますか? https://angular.io/guide/quickstart –

+0

私はできると思いますが、プロジェクトを終了する時間が少なくて済みます。 –

答えて

関連する問題