{"id":232,"date":"2014-06-03T08:00:00","date_gmt":"2014-06-03T08:00:00","guid":{"rendered":"http:\/\/localhost\/?p=232"},"modified":"2015-12-16T19:53:20","modified_gmt":"2015-12-16T19:53:20","slug":"ng-cordova","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/ng-cordova","title":{"rendered":"Announcing ngCordova: Simple AngularJS Cordova Extensions"},"content":{"rendered":"<p><img decoding=\"async\" class=\"showcase-image lazyload\" data-src=\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"><noscript><img decoding=\"async\" class=\"showcase-image\" src=\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\"><\/noscript><\/p>\n<p>Today I am incredibly excited to announce the very first release of <a href=\"http:\/\/ngcordova.com\/\">ngCordova<\/a>, an open-source collection of AngularJS services and extensions that make it incredibly easy to use Cordova plugins and native features in your hybrid apps.<\/p>\n<p>With ngCordova, instead of calling Cordova plugins directly and having to figure out the proper object or plugin name, or to check if the plugin is actually installed, you can just call a simple AngularJS service like this:<\/p>\n<pre><code class=\"javascript\">$cordovaCamera.getPicture(options)\n  .then(function(imageData) {\n\n    \/\/ Process camera data\n\n  }, function(error) {\n\n    \/\/ Show an error to the user\n\n  });\n<\/code><\/pre>\n<p>The services support promises to make it easier to deal with their asynchronous nature and ensure scope data is properly updated. And with support for <strong>14<\/strong> plugins at the time of this writing, ngCordova provides a centralized way to add lots of native functionality to your app!<\/p>\n<p><!--more--><\/p>\n<p>We&#8217;ve got big plans for ngCordova. Soon, it will possible to mock the services for testing outside of a Cordova app in case cordova.js isn&#8217;t available, and to simulate data such as geolocation, accelerometer, and network changes.<\/p>\n<p>As Ionic projects go, ngCordova was a unique one. Created only a <strong>day and a half ago<\/strong> as a fun hack, the project grew out of the suggestion of community member <a href=\"https:\/\/github.com\/pbernasconi\">Paolo Bernasconi<\/a> to make it easier for people to use Cordova plugins in Ionic projects. He noted a lot of Ionic developers on the forum having issues using Cordova plugins due to the lack of centralized documentation and confusing APIs, and figured simple AngularJS wrappers would help.<\/p>\n<p>After creating the <a href=\"https:\/\/github.com\/driftyco\/ng-cordova\">ng-cordova<\/a> repo on github with a simple Camera plugin wrapper, the project immediately recieved 6 pull requests with wrappers for various other plugins (thanks <a href=\"https:\/\/github.com\/gdi2290\">PatrickJS<\/a>!). It seems it struck a chord with hybrid developers!<\/p>\n<p>So, go ahead and check out version <a href=\"https:\/\/github.com\/driftyco\/ng-cordova\/releases\/tag\/v0.1.1-alpha\">0.1.1-alpha<\/a> and let us know what you think! Are there any other plugins you&#8217;d like to see simple wrappers for? We&#8217;d also love some help building out tests and mocking systems for common plugins.<\/p>\n<p>Start adding powerful native functionality to your hybrid and Ionic apps today, with ngCordova and the power of AngularJS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I am incredibly excited to announce the very first release of ngCordova, an open-source collection of AngularJS services and extensions that make it incredibly easy to use Cordova plugins and native features in your hybrid apps. With ngCordova, instead of calling Cordova plugins directly and having to figure out the proper object or plugin [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"","publish_post_category":"","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"","discourse_permalink":"","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[2,3,5],"class_list":["post-232","post","type-post","status-publish","format-standard","hentry","category-all","tag-angularjs","tag-ionic","tag-open-source"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Announcing ngCordova: Simple AngularJS Cordova Extensions - Ionic Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/ng-cordova\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Announcing ngCordova: Simple AngularJS Cordova Extensions\" \/>\n<meta property=\"og:description\" content=\"Today I am incredibly excited to announce the very first release of ngCordova, an open-source collection of AngularJS services and extensions that make it incredibly easy to use Cordova plugins and native features in your hybrid apps. With ngCordova, instead of calling Cordova plugins directly and having to figure out the proper object or plugin [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/ng-cordova\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-03T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-16T19:53:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\" \/>\n<meta name=\"author\" content=\"Max Lynch\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@maxlynch\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Max Lynch\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova\"},\"author\":{\"name\":\"Max Lynch\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/91f360cffbd804a464b0c4a87b5c5f1e\"},\"headline\":\"Announcing ngCordova: Simple AngularJS Cordova Extensions\",\"datePublished\":\"2014-06-03T08:00:00+00:00\",\"dateModified\":\"2015-12-16T19:53:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova\"},\"wordCount\":343,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\",\"keywords\":[\"angularjs\",\"Ionic\",\"Open Source\"],\"articleSection\":[\"All\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/ng-cordova#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova\",\"url\":\"https:\/\/ionic.io\/blog\/ng-cordova\",\"name\":\"Announcing ngCordova: Simple AngularJS Cordova Extensions - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\",\"datePublished\":\"2014-06-03T08:00:00+00:00\",\"dateModified\":\"2015-12-16T19:53:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/ng-cordova\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage\",\"url\":\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/ng-cordova#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Announcing ngCordova: Simple AngularJS Cordova Extensions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/91f360cffbd804a464b0c4a87b5c5f1e\",\"name\":\"Max Lynch\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg\",\"caption\":\"Max Lynch\"},\"description\":\"CEO\",\"sameAs\":[\"http:\/\/twitter.com\/maxlynch\",\"https:\/\/x.com\/maxlynch\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/max\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Announcing ngCordova: Simple AngularJS Cordova Extensions - Ionic Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/ng-cordova","og_locale":"en_US","og_type":"article","og_title":"Announcing ngCordova: Simple AngularJS Cordova Extensions","og_description":"Today I am incredibly excited to announce the very first release of ngCordova, an open-source collection of AngularJS services and extensions that make it incredibly easy to use Cordova plugins and native features in your hybrid apps. With ngCordova, instead of calling Cordova plugins directly and having to figure out the proper object or plugin [&hellip;]","og_url":"https:\/\/ionic.io\/blog\/ng-cordova","og_site_name":"Ionic Blog","article_published_time":"2014-06-03T08:00:00+00:00","article_modified_time":"2015-12-16T19:53:20+00:00","og_image":[{"url":"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg"}],"author":"Max Lynch","twitter_card":"summary_large_image","twitter_creator":"@maxlynch","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Max Lynch","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/ng-cordova#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/ng-cordova"},"author":{"name":"Max Lynch","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/91f360cffbd804a464b0c4a87b5c5f1e"},"headline":"Announcing ngCordova: Simple AngularJS Cordova Extensions","datePublished":"2014-06-03T08:00:00+00:00","dateModified":"2015-12-16T19:53:20+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/ng-cordova"},"wordCount":343,"commentCount":1,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg","keywords":["angularjs","Ionic","Open Source"],"articleSection":["All"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/ng-cordova#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/ng-cordova","url":"https:\/\/ionic.io\/blog\/ng-cordova","name":"Announcing ngCordova: Simple AngularJS Cordova Extensions - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg","datePublished":"2014-06-03T08:00:00+00:00","dateModified":"2015-12-16T19:53:20+00:00","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/ng-cordova#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/ng-cordova"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/ng-cordova#primaryimage","url":"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg","contentUrl":"https:\/\/ionic.io\/img\/blog\/coride-app-preview.pngblog\/ngCordova-ionic-header.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/ng-cordova#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Announcing ngCordova: Simple AngularJS Cordova Extensions"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/91f360cffbd804a464b0c4a87b5c5f1e","name":"Max Lynch","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg","caption":"Max Lynch"},"description":"CEO","sameAs":["http:\/\/twitter.com\/maxlynch","https:\/\/x.com\/maxlynch"],"url":"https:\/\/ionic.io\/blog\/author\/max"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":0,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}