title: Converting string to array using filter and using it in ng-repeat
body: <p>I have a string which is in "1200:2,1300:3,1400:2" format. I need this to be printed like</p>
  
  <pre><code> &lt;p&gt;1200&lt;/p&gt;&lt;p&gt;2&lt;/p&gt;
   &lt;p&gt;1300&lt;/p&gt;&lt;p&gt;3&lt;/p&gt;
   &lt;p&gt;1400&lt;/p&gt;&lt;p&gt;2&lt;/p&gt;
  </code></pre>
  
  <p>I tried using filter,</p>
  
  <pre><code>return function (input) {
                  //Validate the input
                  if (!input) {
                      return '';
                  }
                  var hoaArray = [];
                  var inputArray = input.split(',');
                  for (var i = 0; i &lt; inputArray.length; i++) {
                      var adminTimeArray = inputArray[i].split(':');
                      hoaArray.push({ 'adminTime': adminTimeArray[0], 'dose': adminTimeArray[1]?adminTimeArray[1]:'' });
                  }
                  return hoaArray;
              };
  </code></pre>
  
  <p>and inside html like </p>
  
  <pre><code>&lt;p ng-repeat="timing in timing_list | formatter"&gt;{{timing.}}&lt;/p&gt;{{timing .adminTime}}&lt;/div&gt;
  </code></pre>
  
  <p>I am getting the following error,</p>
  
  <p>Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
  Watchers fired in the last 5 iterations: [[{"msg":"fn: regularInterceptedExpression","newVal":36,"oldVal":34}],[{"msg":"fn: regularInterceptedExpression","newVal":38,"oldVal":36}],[{"msg":"fn: regularInterceptedExpression","newVal":40,"oldVal":38}],[{"msg":"fn: regularInterceptedExpression","newVal":42,"oldVal":40}],[{"msg":"fn: regularInterceptedExpression","newVal":44,"oldVal":42}]]</p>
  
  <p>Could anyone please help me understand what am I doing wrong?</p>
  
  <p>Regards,
  Raaj</p>