In this post, I’d like to show the differences between using an Angular.js factory to get local JSON data vs remote data via an AJAX call. For this example, I’m assuming that we have a JSON dataset that describes different types of fruit, for example: { "fruits": [ { "id": "1", "name": "Apple" }, { "id": "2", "name": "Orange" } ] } At it’s simplest, an Angular.js view to iterate over this data could look like the following HTML: <!doctype html> <html lang="en" ng-app="fruitsApp"> <head> <title>Angular Sample App</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> <script src="app.js"></script> </head> <body> <div ng-controller="fruitsController"> <ul> ...
... real developers use subtitles