My (phonegap) application is working fine in my browser (Chrome+Ripple) as well on my android tablet. However the link isn't working anymore when build the app with xCode and run it on the iPad.
$rootScope.$on('$stateChangeError', function(){..});
shows an error:
config: Object
data: ""
headers: function (c) {a||(a=vc(b));return c?a[D(c)]||null:a;}
status: 404
statusText: ""
__proto__: Object
I guess 404 means "state not found"?
Route:
.state('seminar', {
url: "/seminar/{id}",
views: {
'nav@': { templateUrl: "views/navigation/main.html" },
'main@': { templateUrl: "views/seminars/main.html" },
'side@': { templateUrl: "views/seminars/side.html" }
}
})
View:
<a href ui-sref="seminar({ id: seminarCtrl.seminar.id})">Start</a>
On the login-form,
ng-submit()
is working fine.
I couldn't find any other questions related to this problem. Could there be a problem with iOS and ui-sref/ui-router?
Thank you in advance.
-- Update 1 --
Here is a screenshot of the error message thrown by the $stateChangeError function:
I couldn't find an answer why it is working in the browser but not on iOS, but i managed to find a solution.
My new router:
The problem was hidden in the second route. At first I had written
which lead to a wrong url
It worked for iOS after removing the first part of the url.
Also to mention, the seminar_id will be handed to the second route automatically and is available in the $stateParams.
Hopefully someone can use this information.