I am working on an angular application.
In the current build - there is a controller that gets invoked when a user presses a button - it opens up a modal window and populates the contents as such.
I am trying to remove the modal and reconfigure the application, so that it goes to a new page
The first page is a list of people /people
When you click a person, it will go to a page like /people/view/34323
I am trying to configure the app stateprovider stack like this:
$stateProvider
.state('people-view', {
url: "/people/view/:id",
templateUrl: "partials/people/people-view.html",
controller: personDialogController,
resolve: {
politicservice:function(personservice){
personservice.getPolitics(id).then = persondata.data;
}
biography:function(personservice){
personservice.getBio(id).then = persondata.data;
}
dialogueId:function(personservice){
//id
}
}
})
This will create the basic page...but the services that used to work for this controller now don't.
It's as if the id is not being passed into the resolve functions and it's as if the persondata
then
, the promise is not calling back?