What is the best way to pass message in the below scenario.
In the success scenario of $scope.p.$save, the result contains a message (res.message
$scope.p.$save
res.message
You could use a service which displays the flash on $routeChangeSuccess.
Each time you set a flash message, add it to a queue, and when the route changes take the first item off the queue and set it to the current message.
Here's a demo:
http://plnkr.co/edit/3n8m1X?p=preview