menu

Handling CORS in ionic

date_range 03/09/2015 11:00

CORS, Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources(e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.

Handle hardware back button in Ionic.

date_range 22/08/2015 00:00

Create a service in ionic with the following javascript code:

Restrict Ionic App orientation to portrait mode

date_range 01/08/2015 00:00

Add the following line of code to config.xml to restrict your app to portrait mode.

1
    <preference name="orientation" value="portrait" />

Open ionic app in full screen

date_range 01/08/2015 00:00

To hide the status bar in an Ionic application, we use the Cordova status bar plugin.Install the status bar plugin from the given link.
Status bar
Inside app.js write the following code inside .run method

1
2
3
4
5
app.run(function($cordovaStatusbar){
  $ionicPlatform.ready(function () {
		    $cordovaStatusbar.hide();
	    })
	})

Tabs in Ionic

date_range 18/07/2015 00:00

Open a page in same tab. In app.js create a new state having same tab name as mention above in the code