Add Contact



I’m encountering an issue when I try to add a new contact in my app. For now, I’m just trying to reproduce the simple example in the documentation.

Then, when I want to try with ionic emulate android, compilation fail and I retrieve this error Left-hand side of assignment expression cannot be a constant or a read-only property.

When I look into the Contact’ class, I notice that every properties are declared with the readonly keyword. Did I miss something? Is anybody encountering the same issue ? What should I do?

Thanks in advance for your answer


same here… I also tried to do it with navigator.contacts (works in ionic view) and it says during the build process that “property ‘contacts’ does not exist on type ‘Navigator’” and i have already installed all the required (cordova) plugins…


ok I found the answer that helped me. so you can add a contact that way ->
but you have to reference in your typescript code phonegap.d.ts (from here like that
///<reference path"../../../plugins/phonegap.d.ts"/>

This saved my life, hope it helps you…