SHARE
TWEET

Awais

a guest May 25th, 2016 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var app = angular.module('app', ['ngRoute']);
  2.    
  3. app.controller('myController', function ($scope, $http, $window, $rootScope,$routeParams) {
  4.      
  5. $scope.detailId = function (Id) {
  6.            debugger
  7.            $http.post('/Employees/Detail', { empid: Id })
  8.  
  9.            {
  10.                debugger
  11.                $window.location.href = 'Detail/' + Id;
  12.                $rootScope.empId = Id;
  13.            }
  14.        }
  15.  
  16.        $rootScope.empId = "";
  17.        $scope.detail = function (empId)
  18.        {
  19.          
  20.            
  21.            debugger
  22.            $http.post('/Employees/GetDetail', JSON.stringify({ id: empId }))
  23.            .success(function (result) {
  24.                debugger
  25.                $scope.ampdetail = result;
  26.            })
  27.            .error(function (result) {
  28.                console.log(result);
  29.            });
  30.        }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top