display directly on click in nodejs

//display directly onclick

app.controller("myController", function($scope,$http){



 

$scope.title="welcome";

$http.get("http://localhost:3000/animals").then(function(response){

console.log(response);

});

$scope.data=

[{

"animal":"zebra",

"age":23,

"gender": "male"

},

{

"animal":"lion",

"age":23,

"gender": "male"

},

{

"animal":"tiger",

"age":23,

"gender": "male"

}

]

})

Posted on by