I want to pass the data from one controller1 to another controller2 both of the controller are related to two different functionalities. In controler1 data is loading when I hit the different functionality I want that data in controller2 which is related to different functionality
app.service("knowledgebaseService",function($rootScope){
this.TempData = "";
this.SetData = function(d){
this.TempData = d;
$rootScope.$emit("knowledgebaseevent")``
}
this.GetData = function (){
return this.TempData;
}
})
I want the data to be loaded in html file