Currently, I am able to load a collection of JSON data using the code below:
$scope.properties = [{
title: "Tai's Bull Country Inn",
property_type: ['pub','hotel','bandb','restaurant','selfcatering'],
location: ['coastal','rural','urban'],
}];
However, when I attempt this method, it does not function as expected:
$http.get('json.js').success(function (data) {
$scope.properties = data;
console.log($scope.properties);
});
Although the console.log output shows the correct information, the filter functions that I am using are causing errors. This could be due to them executing before the data is fully loaded or potential issues with how my json file is structured. You can view a Plunker demonstration here:
http://plnkr.co/edit/U97RTGZmsmhUJ4nhohbF?p=preview
As someone new to this area, there may be something apparent that I am missing.