Ivaro18 Ivaro18 - 1 year ago 122
reST (reStructuredText) Question

Ionic / Angular - Master detail within master detail

Hi I'm trying to develop (using ionic, so also angular) a feature in which users can see all events, and see all attending participants. Of all these participants there is information available, so I tried making a master-detail pattern within the master-detail (so basically master-detail-detail).

Problem is, it is returning a 404 while the link is

and the http function should return a JSON object but I couldn't test it since the page or url wasn't found.


// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
var app = angular.module('newsApp', ['ionic']);

app.config(function($stateProvider, $urlRouterProvider){
url: '/',
templateUrl: 'list.html',
controller: 'ListCtrl'
url: '/evenement/:eventId',
templateUrl: 'detail.html',
controller: 'DetailCtrl'
.state('deelnemer', {
url: '/evenement/:eventId/deelnemers/:deelnemerId',
templateUrl: 'deelnemer.html',
controller: 'DeelnemerCtrl'


app.factory('Evenementen', function($http){
var cachedData;

function getData(callback){
var url = "http://localhost:8080/evenementen";

cachedData = data;

return {
list: getData,
find: function(pid, callback){
console.log("greater succes");

app.controller('ListCtrl', function($scope, $http, Evenementen){
$scope.news = [];

$scope.getMovieDB = function(){
$scope.evenementen = evenementen;


app.controller('DetailCtrl', function($scope, $http, $stateParams, Evenementen){
Evenementen.find($stateParams.eventId, function(evenement){
$scope.evenement = evenement;
$scope.deelnemers = evenement.alleDeelnemers;

app.controller('DeelnemerCtrl', function($scope, $http, $stateParams){
$http.get("http://localhost:8080/evenementen/"+ $stateParams.eventId+"/deelnemers/"+$stateParams.deelnemerId)
$scope.deelnemer = data;

app.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)

// Don't remove this line unless you know what you are doing. It stops the viewport
// from snapping when text inputs are focused. Ionic handles this internally for
// a much nicer keyboard experience.
if(window.StatusBar) {

Answer Source

Urls in Angular and ionic use hash, so your url should be:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download