Hi there, I'm currently facing an issue with retrieving data from a webpage for use on my own website.
I'm working with AngularJS and attempting to fetch data from . When checking my page in Chrome, I encountered the following error:
ReferenceError: $http is not defined
This is a snippet of my code:
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8" />
<title>AngularJS</title>
</head>
<body>
<script src="angular.min.js"></script>
<script>
function LibraryController($scope) {
var urlBase = 'http://irys.wi.pb.edu.pl/bibWS/books';
$scope.books = $http.get(urlBase);
}
</script>
<div ng-controller="LibraryController">
Title: <input type="text" ng-model="searchText" /><br />
<ul>
<li ng-repeat="book in books">
<strong>{{book.title}}</strong> -
<em>{{book.author_id}}</em></li>
</ul>
</div>
</body>
</html>