Screen orientation not working

i have made a app.i want its orientation landscape mode only i tried
<preference name="orientation" value="landscape" /> in config.xml but its not working and also tried

`.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {

  // LOCK ORIENTATION TO landscape.
screen.lockOrientation('landscape');
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
  cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
  // org.apache.cordova.statusbar required
  StatusBar.styleDefault();
}

});
})`

in app.js its also not working since am new to ionic please help…am running using phonegap