AngularJS how to assign response data to a variable -


how can assign response variable or $scope. here want assign response data variable

here screen shot enter image description here

'use strict';  `var dashmodule = angular.module("student");`      dashmodule.controller("studentdashboardctrl",        ['$scope', 'authservice', 'studentservice',            function ($scope, authservice, studentservice) {                //check authorised user                var data;                authservice.checauthentication();                studentservice.getbatchlist(function (response) {                    console.log(response);                 });              }]); 

you can store in $scope variable,

  • $scope.value=response;

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -