<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy AngularJS Tutorials</title>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script>
    </head>
    <body>
        <div ng-app="myApp" ng-controller="httpCtrl">                          
            <h3 >Content : {{content}} </h3>
            <h3 >Status Code : {{statuscode}} </h3>
            <h3 >Status Text : {{statustext}} </h3>                          
        </div>
        <script>
            var app = angular.module("myApp", []);
            app.controller("httpCtrl", function($scope, $http) {
                $http.get("wikitechy.html")
                    .then(function mySuccess(response) {
                    $scope.content = response.data;
                    $scope.statuscode = response.status;
                    $scope.statustext = response.statusText;
                }, function myError(response) {
                    $scope.content = "Error while loading wikitechy.html";
                    $scope.statuscode = response.status;
                    $scope.statustext = response.statusText;
                });
            });
        
</script>                  
    </body>
</html>
 


www.wikitechy.com © Copyright 2016. All Rights Reserved.