title: Capacitor / Ionic / Vue Local Notification eventlistener
body: <p>I'm trying to get Local Notifications working in an Ionic Vue app (using capacitor).</p>
  <p>I did get scheduling notifications working, but now i want to listen to clicks on the notification.</p>
  <p>in main.js I bind LocalNotifications to this.$LocalNotifications:</p>
  <pre><code>import { Plugins } from '@capacitor/core';
  const { LocalNotifications } = Plugins;
  
  Vue.prototype.$LocalNotifications = LocalNotifications;
  </code></pre>
  <p>in my Root component App I have this:</p>
  <pre><code>created() {
  console.log('Created!')
  document.addEventListener('deviceready', () =&gt; {
        console.log('ready');
         this.$LocalNotifications.addListener('localNotificationReceived', (notification) =&gt; {
            console.log('Notification action received', notification);
          });
      }, false);
  }
  </code></pre>
  <p>When I build and run on the ios-emulator, i get the following output in my log:</p>
  <pre><code>APP ACTIVE
  To Native Cordova -&gt;  Badge load Badge1248600129 [&quot;options&quot;: []]
  ⚡️  [log] - onscript loading complete
  To Native Cordova -&gt;  Device getDeviceInfo Device1248600130 [&quot;options&quot;: []]
  ⚡️  To Native -&gt;  Storage get 90127150
  ⚡️  TO JS {&quot;value&quot;:null}
  ⚡️  [log] - Created!
  To Native Cordova -&gt;  LocalNotification launch LocalNotification1248600131 [&quot;options&quot;: []]
  To Native Cordova -&gt;  LocalNotification ready INVALID [&quot;options&quot;: []]
  ⚡️  To Native -&gt;  LocalNotifications addListener ⚡️  [log] - ready
  90127151
  ⚡️  WebView loaded
  ⚡️  To Native -&gt;  App addListener 90127152
  </code></pre>
  <p>When I schedule a Notification, the notification does show up, but I think something doesn't go quite well when i'm adding the listener:</p>
  <pre><code>INVALID [&quot;options&quot;:[]]
  </code></pre>
  <p>Does anyone have any idea how to solve this?
  Or does anyone have a code example of working notifications in an Ionic Vue app?</p>
  <p>Kind regards,</p>
  <p>Bram</p>