Angular: ng-repeat scope - 14410993

http://angularjs.org/

by Sajeetharan Sinnathurai

HTML

<div ng-controller="MyCtrl">
  <div ng-repeat="line in lines">
      <div class="preview">{{line.text}} {{$index}}</div>
   </div>
   <div ng-repeat="line in lines">
      <!-- typing here should auto update it's preview above -->
      <input ng-model="line.text"/>
      <!-- many other fields here that will also affect the preview -->
    </div>
</div>

JavaScript

var myApp = angular.module('myApp', []);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope) {
  $scope.string = 'Gzrgh,1,2,1,4,1,1,1,20150304,20180304';
        $scope.arrString = new Array();
        $scope.arrString = $scope.string.split(',');
}