Cordova-plugin-contacts leaves navigator.contacts as undefined?
<p>To give some background on my current project - I am working on a phonebook application for employees where there will be a button to create a new contact on the user's device. I am using the following plugin to handle this in my Ionic application:</p>

<p><a href="http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-contacts/" rel="nofollow">http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-contacts/</a></p>

<p>When attempting to access the plugin the way that the documentation states:</p>

<pre><code>navigator.contacts
</code></pre>

<p>I had also tried to access via</p>

<pre><code>window.navigator.contacts
</code></pre>

<p>It returns an undefined error. In the documentation it states that this will only be accessible after the deviceready event is fired - so my code was the following:</p>

<pre><code>document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log("Testing Navigation Contacts");
    console.log(navigator.contacts);
}
</code></pre>

<p>I also tried to utilize the $ionicPlatform.ready functionality as done below:</p>

<pre><code>$ionicPlatform.ready(function() {
    var myContact = window.navigator.contacts.create({"displayName": "Test User"});
    myContact.save();
});
</code></pre>

<p>The exact error message is listed below:</p>

<pre><code>Error: undefined is not an object (evaluating 'navigator.contacts.create')
</code></pre>

<p>Any help would be much appreciated, guys. I'm at a loss of what else to try. Thanks for reading!</p>

<p>Mike</p>