Added controller logic.
Updated to use "ng-repeat".
Updated the getJsonResult method to handle parameter correctly.
Refactored controllers.js by separating methods from controller to service.