<html><script src="https://cdn.staticfile.net/angular.js/1.6.9/angular.min.js"></script><body><div ng-app="myApp" ng-controller="myCtrl"> <p>今天的欢迎信息是:</p><h1>{{myWelcome}}</h1></div><p>$http 服务向服务器请求一个页面,并将响应设置为“myWelcome”变量的值。</p><script>var app = angular.module('myApp', []);app.controller('myCtrl', function($scope, $http) { $http.get("welcome.htm").then(function (response) { $scope.myWelcome = response.data; // 将响应数据设置为myWelcome变量的值 });});</script></body></html>