List to be clickable and to lead you to another different list

I have created an ionic list, what I am not sure of doing is being able to click on the items to take you to another list.

so the first list is hard coded into the main.html

I want to be able to click on item list to be able go to the secondary list which has a json. the hard part is the controller for that ngular. I am a newbie any assistance will be greatly appreciated.

kind regards
simon peter

You need to pass first list id to second controller and catch first list id on second controller and then get second list on the basis of first list id.

Are you using stateprovider ?

.config(function($stateProvider, $urlRouterProvider) {

.state(‘app’, {
url: ‘/app’,

templateUrl: 'templates/main.html'


.state(‘app.itemList’, {
url: ‘/itemList’,
templateUrl: ‘templates/itemList.html’,
controller: ‘restController’

//Controller for the second list.

.controller(“restController”, [’$scope’, ‘$http’, function($scope, $http){
$scope.restList = resturants;

Yes I use $stateProvider, please modify my controller as you think It can work.

Check how to work with routing in angularjs

thanks, let me check it out