I am trying to use data in a redirected page which is redirected in angular. How can I move data in this case. I tried using in rootscope but is this preferable? is ther any way where I can use the data from first page and use it in the page after redirection?
var app = angular.module('urlApp', []);
app.controller('urlCtrl', function ($scope, $log, $window) {
$scope.ClickMeToRedirect = function () {
$scope.myData = datafrommyDb;//This is what I am planning to use in redirected page
var url = "http://" + $window.location.host + "/Account/Login";
$log.log(url);
$window.location.href = url;
};
});