AngularJS elements showing up in Android


#1

In my Ionic App, the AngularJS elements are showing up first and then data loads coming from the web socket api using angularjs…could anyone help me out ?


#2

What do you see? Code with curly braces?

You could add an ng-if=“fetchedItems” (i.e.) to the root element to prevent rendering blocks of code with non-fetched data


#3

yes those curly braces i am seeing over there…{{element}}


#4

Use ng-cloak to resolve this issue.

http://www.codeandyou.com/2015/08/what-is-ng-cloak-directive-in-angularjs.html


#5

ng-if=“fetchedItems” not working


#6

You should use the name of the set thats being fetched and init it with null in the component. But your problem is a little different to what i though, so you might want to use ng-cloak


#7

ngCloak solution worked !!! Thanks for your help