Run ❯
zig
.
com
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <script src="../../ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <body> <div ng-app="myApp" ng-controller="myCtrl"> <p>This header will change after two seconds:</p> <h1>{{myHeader}}</h1> </div> <p>The $timeout service runs a function after a specified number of milliseconds.</p> <script> var app = angular.module('myApp', []); app.controller('myCtrl', function ($scope, $timeout) { $scope.myHeader = "Hello World!"; $timeout(function () { $scope.myHeader = "How are you today?"; }, 2000); }); </script> </body> <!-- /angular/tryit.asp?filename=try_ng_services_timeout by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 06 Feb 2025 19:25:00 GMT --> </html>