AngularJS how to assign response data to a variable -
how can assign response variable or $scope. here want assign response data variable
'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
Post a Comment