On Refresh or On Load Page - AngularJS Code is shown

Viewed 875

I am new in AngularJS.

I am fetching data from the Rest API and displaying it on the page.

My Supposed code is giving below.

$http.get(local_url+'/data').
    then(function(response) {
        $scope.data = response.data.client_data;
    });

Now when suppose I write.

<p>{{ data.name }}</p>

So when i come on page, it is showing above {{ data.name }} code after sometime it is showing any name.

=============================================================

Solution.

I used in body tag like that. <body ng-cloak> It will work.

thanks.

1 Answers
Related