demoApp.controller('fruitDetailController', function ($scope, $routeParams) { var fruitname = $routeParams.fruitname; // In a real app, I would do something really smart to generate // the data you want about fruitname and then put that data into // $scope. But for now, I'm going to be very lazy: $scope.fruit = { name: fruitname, link: "https://lmddgtfy.net/?q=" + fruitname }; });