Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

how to pass data one page to another page using angular js

how to pass data one page to another page using angular js  using -'javascript,angularjs,,angularjs-ng-repeat'

Here I am Trying to Login with user credientials
if user is valid , I want to pass UserName,LastloginTime,Role values to another page using angular js

<form role="form" ng-app="MyApp" ng-controller="MasterController">
        <div class="form-group">

            <input type="text" class="form-control" placeholder="Username" required ng-model="username" />
        <div class="form-group">
            <input type="password" class="form-control" placeholder="Password" required ng-model="password" />
        <div class="checkbox">
                <input type="checkbox" ng-model="remember">
                Remember my Password
        <input type="button" value="Submit" ng-click="GetData()" class="btn btn-danger" />
        <%--<button type="button" class="btn btn-danger" ng-click="GetData()">Submit</button>--%>
        <span ng-bind="Message"></span>

js file here

   $scope.GetData = function () {
        var data = { UserName: $scope.username, Password: $scope.password };
        $"api/Test/CheckUsername", data)
       .success(function (data, status, headers, config) {
           if (data != "") {
               $scope.Employees = data;
               window.location.href = "EmployeeMaster";
               //$scope.Reporting = data;
           else {
               alert("Invalid Credientials");


I want to display values in a master page

                        <table class="table">
                            <tr ng-repeat="Emp in Employees">
                                <th>User </th>
                                <th>Designation </th>
                                <th>Last Login </th>

How can i pass the values login page to Home page?

asked Oct 6, 2015 by nikhilapatil
0 votes

Related Hot Questions

Government Jobs Opening