Я пробую $ http сервисный код, но не получаю результат
это код для samp.html
<!DOCTYPE html>
<html>
<head>
<title>
AngularJs $http Service Example
</title>
<script
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js">
</script>
<script type="text/javascript">
var app = angular.module('serviceApp', []);
app.controller('serviceCtrl', function ($scope, $http) {
$http({
method: 'GET',
url: 'welcome.html'
}).then(function success(response) {
$scope.myWelcome = response.myWelcome;
}, function error(response) {
});
});
<div ng-app="serviceApp" ng-controller="serviceCtrl">
<p>Hi, Guest</p>
<h1>{{myWelcome}}</h1>
</div>
`` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` это код для welcome.html``````` `` `` `` `` ``
<!DOCTYPE html>
<html>
<body>
<h3>Welcome to my page</h3>
</body>
</html>
I want to get a result like
Hi Guest
Welcome to my Page