*Hi*

*i need to use js code in about 10 pages - but each page will have get url 
not as other as example:*

page 1: will use get url: /api/Ready
page 2: will use get url: /api/NotReady
page 3: will use get url: /api/Done
page 4: will use get url: /api/waiting list

*all will use that same js code:*

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

app.controller('InvoiceController', [
                   '$scope', '$http', function ($scope, $http) {
                       $http.get("/api/NoReady") // this is url needed to 
pass as parameter ?
                           .success(function (data) {
                               var dataByMonth = {};
                               data.forEach(itemToMonth);
                               $scope.customersByMonth = dataByMonth;

                               function itemToMonth(item) {
                                   item.MirageDate = new 
Date(item.MirageDate)
                                   var month = item.MirageDate.getMonth();
                                   var year = item.MirageDate.getFullYear();
                                   dataByMonth[year + '-' + month] = 
dataByMonth[year + '-' + month] || [];
                                   dataByMonth[year + '-' + 
month].push(item);
                               }
                           });
                   }
]);

*so please can i get help about that with sample example to learn how can i 
do it ?*

*Thanks a lot ...*

-- 
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