Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

how we work with session in asp.net boilerplate #368


User avatar
0
abu created

i have a .js file with following coding

(function () {
    var controllerId = 'app.views.listofemployees';
    angular.module('app').controller(controllerId, [
        '$scope', '$location', 'abp.services.ameba.employee', function ($scope, $location, employeeService) {
            var vm = this;
            var localize = abp.localization.getSource('Ameba');
            $scope.detail = JSON.parse(sessionStorage.getItem("detail"));
employeeService.getEmployees(
                     $scope. detail
                  ).success(function (data) {
                      vm.employees = data.employees;

In above coding i want to pass a $scope. detail to pass when employeeService.getEmployee method called.

sir please help me. waiting for a reply.


3 Answer(s)
  • User Avatar
    0
    ddnils created

    You should probably ask this in a StackOverflow Angular department. Also I am not sure what your problem is... what do you want to do with the $scope.detail object?

    best regards, Nils

  • User Avatar
    0
    abu created

    sir i want to show some information in somepages

  • User Avatar
    0
    abu created

    sir one more issue how i will show a selected list of employees from database. in following code

    (function () {
        var controllerId = 'app.views.listofemployees';
        angular.module('app').controller(controllerId, [
            '$scope', '$location', 'abp.services.ameba.employee', function ($scope, $location, employeeService) {
                var vm = this;
                var id;
                var persondetail
                vm.employees = [];
                var localize = abp.localization.getSource('Ameba');
                $scope.detail = JSON.parse(sessionStorage.getItem("detail"));
                var details = $scope.detail
                for (var i = 0; i < details.length; i++)
                {
                    persondetail = details[i];
                    console.log(persondetail.companyId);
                }
               
                vm.info = {
                    CompanyId: persondetail.companyId,
                    DesignationId:2
    
                };
                vm.refreshMember = function () {
                   employeeService.getEmployees(
                      vm.info
                      ).success(function (data) {
                          debugger;
                       
                          vm.employees = data.employees;
                  
                  })
                };
              
            }]);
    })();
    

    i am getting error

    please help