title: "Uncaught TypeError: Cannot read property 'OneSignal' of undefined
body: <p>I am tried to use push notification . so i am using onesignal.
    while using this i got this error  </p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot read property      'OneSignal' of
    undefined"</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>   .run(function($ionicPlatform) {
         $ionicPlatform.ready(function() {
           // Enable to debug issues.
           // window.plugins.OneSignal.setLogLevel({logLevel: 4, visualLevel: 4});
  
           var notificationOpenedCallback = function(jsonData) {
             console.log('didReceiveRemoteNotificationCallBack: ' + JSON.stringify(jsonData));
           };
  
           window.plugins.OneSignal.init("AIzaSyCkgXtEUurHrM5rYUmstQmL7s8HkA6OTpA", {googleProjectNumber: "583817643699"}, notificationOpenedCallback);
           // Show an alert box if a notification comes in when the user is in your app.
           window.plugins.OneSignal.enableInAppAlertNotification(true);
         });
       })
  </code></pre>
  
  <p>plese help me to find good solutions</p>