ngCordova

程序名称:ngCordova

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

ngCordova 介绍

ngCordova 包含一组 AngularJS 的表达式,基于
Cordova API 构建,用于简化构建、测试和发布 Cordova 应用。

示例代码

使用摄像头:

module.controller('PictureCtrl', function($scope, $cordovaCamera) {
  $scope.takePicture = function() {
    $cordovaCamera.getPicture({
      // See all the possible Camera options from the Camera docs [1]:
      /// https://github.com/apache/cordova-plugin-camera/blob/master/doc/index.md#cameraoptions
    }).then(function(imageData) {
      // Success! Image data is here
    }, function(err) {
      // An error occured. Show a message to the user
    });
  }
});

条形码扫描:

module.controller('MyCtrl', function($scope, $cordovaBarcodeScanner) {
  $cordovaBarcodeScanner.scan().then(function(result) {
    // Scanner result  }, function(err) {
  });

ngCordova 官网

http://ngcordova.com/

相关编程语言

BBGestureBack Full screen return gesture(全屏手...
Framework7 或者叫 F7 是全功能的绑定 iOS 7 应用的...
iOS 调试库,支持 iOS8+,无需添加任何代码,方便 i...
DarkModeKit是在Apple官方的深色模式发布之前设计和...
SimpleNote iOS 版客户端。SimpleNote 是一款在多平...
Kivy iOS,此工具旨在为 iOS 编译必要的库以运行应用...