*Thanks a lot Sander*

*so sorry for not understanding you as it should be - i'm new with angular 
- i have add sample project 
here: http://plnkr.co/edit/JERX3iqg1mF7M0TBpLH2?p=preview 
<http://plnkr.co/edit/JERX3iqg1mF7M0TBpLH2?p=preview>*

*hope you take a look and help me (i have create an array has some data but 
i can't view it with angular )*

On Saturday, June 6, 2015 at 7:31:47 AM UTC+2, Sander Elias wrote:
>
> Hi Ahmed,
>
> Don't try to solve this in the template. While it is possible, you will 
> offload a lot of complexity into your template that does not belong there.
> do something like this in your controller. (For your reference, if you 
> have an $http call in your controller, that is a sure sign you need a 
> service/factory, as a rule of thumb, don't do $http in a controller)
>
> $http.get("/api/Test").success(function (data) {
>     var dataByMonth = [];
>     data.forEach(itemToMonth);
>     $scope.customers = dataByMonth;
>
>     function itemToMonth(item) {
>         var month = item.MyDate.getMonth;
>         dataByMonth[month] = dataByMonth[month] || [];
>         dataByMonth[month].push(item);
>     }
> });
>
> Then you can simply nest the repeat, and be done with it.
> When you have difficulties doing this, set up a plunk 
> <http://plnkr.co/edit/tpl:bSBatno6Z85VMCtxF4KK>, and I will take a look 
> for you.
>
> 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