javascript - passing scope model data to controller -


with angular, have following setup on view:

 <div class="sli1"  ng-init="test=[10,20,30,40,50]"   <div class="sli2"  ng-init="test2=[10,20,30,40,50]" 

i'm trying pass ng-init data model controller pick as:

$scope.data1= $scope.test; $scope.data2= $scope.test2; 

where use further down in array:

$scope.sli['test'][0]; $scope.sli['test'][1]; $scope.sli['test'][2]; $scope.sli['test'][3]; 

however not sure i've missed out.

my suggestion study more how angularjs works,initializing data on view , passing controller process on them wrong ,especially if doing process on data


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -