How can we switch browsing between remote website and local html pages into ionic app

I have requirement to load some of the pages locally that will download with the app but after longing i wants to load my server ionic website pages.

How can i load remote url within ionic app.Is there any predefined rule for that.

You should be able to reference them by using their address AFAIK. The only thing you may need to do is whitelist their urls in your config set up

thanks …but i could not understand here what you are suggesting …could you please explain in detail.

look here:$compileProvider:

And for “unsafe” html-snippets:$sanitize


1 Like

That and you should be able to specify a template like so…

.state('eventmenu.home', {
      url: "/home",
      views: {
        'menuContent' :{
          templateUrl: ""

thanks its working… but for coming back to local page again we have to write code in native file or we have same option in angular state like

.state('index', {
      url: "/index",
      views: {
        'menuContent' :{
          templateUrl: "file:///android_asset/www/Index.html"

I tried it but its not working…getting Error

XMLHttpRequest cannot load file:///android_asset/www/index.html. Cross origin requests are only supported for HTTP

how can we coming back to local page again.

yes the same problem here i am getting .is there any update on this


Any update on this ?