NG-Include Issues on Phone

I created an android build to test out on my phone. I’m using ng-include to embed an html file. It works using developer tools in Chrome, but not my phone and can’t figure out why.

Any ideas?

Where is the HTML file coming from? If external, you need to look at whitelisting the source (via the plugin). If internal, then you might need to explore the proper path once on-device.


It’s in the templates folder.

I have <div ng-include src="'../templates/discover.html'"></div>

if its in the template folder should it not just be "'templates/file.html'"?

No, because the ng-include div tag is in a html file within the templates folder. It’s not in the index.html.

So I have:

----calling.html (has the ng-include tag)

Have you actually tried what I suggested ?

It doesn’t matter where the actual template file is that is loaded.

I just tried it on my iPhone:

   +-----help.html (has the ng-include)

inside hello.html:

 <div ng-include src="'templates/hello.html'"></div>

shows up fine.

It worked. Thanks so much.

1 Like