ionic v1 ionicconfig mode code example

Example 1: angular 1 decorator example

angular.module("myAppName").decorator(                                            
        "$ionicActionSheet",                                                         
        function $ionicActionSheetDecorator( $delegate ) {                           
              var originalWarn = $delegate.show;                                     
              $delegate.show = function decoratedWarn(msg) {                         
                  alert("about to show");//do whatever you want here
                originalWarn.apply($delegate, arguments);                            
              };                                                                     
              return $delegate;                                                      
        }                                                                            
);

Example 2: ionic 5 make app potrait only

If you want to restrict to portrait mode only on all devices
you should add this line to the config.xml in your projects root folder.

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

After that, please rebuild the platform by typing below text in command line:

ionic build

Tags:

Misc Example