I have index.html
Previous
<body ng-app="MainController">
<div class="page page-base {{ pageClass }}" ng-view>
</div>
</div>
I assigned some values to $scope.errorMsg in registerController so changed Changed to
<body ng-app="myApp">
<div class="page page-base {{ pageClass }}" ng-view>
<div ng-controller="MainController" ng-click="doClick($event)"></div>
<div ng-controller="RegisterController"></div>
</div>
</div>
In controller when I do console.log It print the value but it is not getting displayed on error.html page.
$scope.errorMsg = data.message;
$location.path("/reg/error");
I am new to Angular, Please let me know if I need to add in more info for my problem
Try interpolation in the scope of RegisterController:
Update
A common source of confusion to those new the angular is that scopes and controllers come and go with the wind, and it's not obvious where to place transient data.
Since angular services are singletons, one solution is to implement a service to store transient state - in the OPs case, "errorMsg" - among view changes.
Here's a bare bones singleton service.
It's easily passed along to controller instances like so
Here's a plunkr that demonstrates the concept, using your code as a base.