Q:

How to pass javascript array variable values to html using angular.js

I am new to angular.js
I want to create a table by populating values from a javascript array variable.
I created and entered values in my variable like this
        var result=[];    

        //some loop. Just demonstrating that there are multiple values of id and text
        result.push(
            {
                "id":obj["id"],                
                "text":obj["text"],
            }
        );

I want a new row for each id and text from result variable in html
<table>
<tr><td>id</td><td>text</td></tr>
<table>

What is way to do this using angular.js.

A:

Figured it out. Putting it here if anyone needs it.
Javascript code:
function controller($scope, $http) {

    $scope.results=[];
    $http.get(url).success(function (data) {

        $.each(data, function () {
            var obj = data;
            console.log(obj);
            $scope.results.push(
                {
                    "id": obj["obj_id"],                    
                    "text": obj["text"]
                }
            );

        });
    });

}

html code
<div  ng-controller="controller">
    <table ng-repeat="result in results">
    <tr><td>{{result.id}}</td><td>{{result.text}}</td></tr>
    <table>
</div>

