Thanks Sander, that really helped and I am able to view the value from view.

{{viewModel.memCount}} displays 6 -- fine.

But when I try to create inputs based on the count, its not working
<td ng-repeat="i in viewModel.memCount track by $index"><div 
class="input-group"><span class="input-group-addon">Rs</span><input 
ng-model="viewModel.newExpense.memSpent[$index]" class="form-control 
input-sm" /></div></td>


I was expecting 6 input fields.. but sadly it doesnt output any :( . I know 
I may be asking silly doubts.. but i am just a newbie. So If you can help 
pls!!

On Wednesday, June 3, 2015 at 3:55:18 PM UTC+5:30, Sander Elias wrote:
>
> Hi Abdul,
>
> Nothing angular specific. Create a getter is the easiest way.
>
>  Object.defineProperties($scope.viewModel, {
>   "membersLength": {
>     get: function () {
>       return this.members.length;
>     } 
>   }
>  });
>
> Regards
> Sander
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to