My goal is to create a functionality where clicking on the anchor within the #leftDiv triggers the opening of the UI router template in the #rightDiv. Specifically, I want clicking on Hello Plunker 1 in the #leftDiv to display peopleOne.html in the #rightDiv, and clicking on Hello Plunker 2 should replace peopleOne.html with peopleTwo.html in the #rightDiv.
For reference, you can check out a demo on Plunker - https://plnkr.co/edit/T8RTgea8VccA9mdBABGC?p=preview
If anyone could shed light on why this functionality is not working as expected, it would be greatly appreciated.
Script.js
var Delivery = angular.module('Delivery', ['ui.router']);
angular
.module('Delivery')
.config(function($stateProvider, $locationProvider) {
$locationProvider.hashPrefix('');
$stateProvider
.state('home', {
url: '/Delivery',
views: {
'view': {
templateUrl: 'Delivery.html',
},
},
})
.state('peopleOne', {
url: '/peopleOne',
parent: 'home',
views: {
'view@': {
templateUrl: 'peopleOne.html'
}
},
})
.state('peopleTwo', {
url: '/peopleTwo',
parent: 'home',
views: {
'view@': {
templateUrl: 'peopleTwo.html'
}
},
})
})