<p>{{message}}</p>
angular.module('static', []) .controller('esastatic', ['$scope', static]); function static($scope) { $scope.getMessage = function () { setTimeout(function () { $('#a').html('kjgh'); $scope.message = 'Fetched after two seconds'; console.log('message:' + $scope.message); $scope.$apply(); //this triggers a $digest }, 5000); }; $scope.getMessage(); }
.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)