Ionic android file not found error (file in asset folder)


#1

I am trying to build a basic android app using ionic.

Started with the blank template.

Then tried to implement the “ToDo” app in the ionic documentation.

Everything works fine when the app is launched on the browser (ionic serve).

But when tried to run the app on android, I am facing a problem.

The android app runs. But it fails to load the newly added html templates (new_task.html) from the asset folder.
I have attached a screen shot from chrome inspect.

But the file is loaded in C:\Users\raghu\Documents\development\ionic\simplydo\platforms\android\assets\www
I have attached the screen shot of the file explorer.

I have tried removing the android platform and then adding it again. Then generated the app again, but no luck.

ionic version : 1.7.16
cordova version : 6.2.0
cordova android version : 5.1.1

I am developing it on windows 8.1

Any clue on this?


#2

Default landing page is index.html, You can use template to add new pages.


#3

The default landing page index.html is loaded in the asset folder. That is why the app is working. From the index.html page I am trying to load a modal whose template is new_task.html (which is not loaded to the android asset folder).


#4

Easy fix.
It seems the way the template path is mentioned in the code is not correct.
Got the clue from http://stackoverflow.com/questions/28965703/loading-angularjs-template-on-a-phonegap-cordova