html - how to use the get() function in the $http service -
i learning $http service not clear on regarding get(). below code doesn't execute demo2.htm. please check , advise made mistake.
var app = angular.module('myapp', []); app.controller('urlctrl', function($scope, $http) { $http.get('demo2.htm').then(function(response) { $scope.mywelcome = response.data; }); });
it seems $http
service not you're looking if you're trying access resource same location html/js files. 1 of following should better suit situation:
Comments
Post a Comment