Json parsing from server in tabs activity


I’ve started an ionic app with the basic tabs activity. And for each tab page, there is a folder, which inturn has a html, ts and a scss file. The html file is a template within <ion-content>...</ion-content>. I now want to get a json encoded result from a server, for which I’m using the in-built angular http: service. I’ve coded a JS file with the controller for getting the results from the server:

.controller('deals_controller', function($scope, $http){
    $scope.result = "";
        .success(function(data, status, headers, config){
            $scope.result = data;

Now my query is that how do I bind the controller to the DOM elements and where do I include the script tag with the JS file as src?


You would probably get better results if you categorize your question appropriately. That doesn’t look like Ionic 2 to me.