I have two controller - controller1 and controller2.
app.controller('Controller1', function($scope) {
$scope.setItems=function()
{
var itemName='Lemon';
}
});
app.controller('Controller2', function($scope) {
//This controller i want da get 'itemName' from 'controller1'
});
How to get Data from controller2 to controller1. I apologize that my example is simple, but I want to figure it out