angularjs - Data from server not updated througn hg-bind in angular.js -
the data server want display through ng-bind
in angular.js. in controller scope.first_name
updated. not displayed in html. shows error
error: [$rootscope:infdig] http://errors.angularjs.org/1.3.14/$rootscope/infdig?p0=10 http://errors.angularjs.org/1.3.14/%24rootscope/infdig?p0=10
please tell me solution issue. through below code tried.
$http.get('sample.php', config) .success(function (data, status, headers, config) { if (data.length >= 1) { $location.path("/inbox"); $scope.first_name = data[0].firstname; console.log($scope.first_name); } else { alert("invalid userid"); } }) .error(function (data, status, headers, config) { });
Comments
Post a Comment