I am trying to get URL parameters using $routeParams:
var myApp = angular.module('myApp', [ 'ngRoute', 'appControllers', 'appFilters', 'appServices' ]).config(['$routeProvider', function($routeProvider) { $routeProvider.when('/admin/organisations/:organisation_id', { controller: 'UpdateOrganisationCtrl' }); }]); and in my Controller:
appControllers.controller('UpdateOrganisationCtrl', ['$rootScope', '$scope', '$http', '$window', '$routeParams', function($rootScope, $scope, $http, $window, $routeParams) { console.log($routeParams.organisation_id); }]); However I am printing undefined as $routeParams is {} Any thoughts?
organisation_idis breaking things? Does renaming it asorganisationidhelp atall?