Just to quickly show you what I changed, I added a resolve to my
routeProvider, and using a service I've passed the data to my controller,
as following:
.when('/', {
templateUrl: 'partials/jobs-list.html',
controller: 'JobsController',
resolve: {
tmpJobs: function(dataService) {
return dataService.getJobs(0);
},
menu: function(dataService) {
return dataService.getMenu();
}
}
})
On Thursday, October 16, 2014 10:29:14 PM UTC+8, Sander Elias wrote:
>
> Hi Wouter,
>
> Yes this is possible. but you need to keep your data in a service, and use
> an resolve to get it into your controller.
>
> If you need a bit more then this, just ask, and I will see if I have an
> ready example. I don't have the time right now.
>
> 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.