惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - 晴窗笔记

javascript的严格模式:use strict Ionic在线打包IOS平台应用 安装nodejs6.9x以后,原来在nodejs4.2.x中运行正常的ionic项目出现问题的解决 cordova插件分类 ionic 启用sass 为Asp.net WebApi 添加跨域支持 使用ionic framework创建一个简单的APP 研究主题 近两天让我羞愧难当的遭遇 cordova环境配置 正则表达式基础 2016年读书计划 红皇后假说 微信OAuth2.0网页授权 2016年碎语 Apache + PHP 环境搭建 各种环境配置 技术名词记 使用新浪云(SAE)实现基于mySql和微信公众平台的关键字请求响应服务
ngCordova
晴窗笔记 · 2016-12-21 · via 博客园 - 晴窗笔记

参见:http://blog.csdn.net/Luo_xinran/article/details/52164480

ngCordova是基于Cordova封装的AngularJS的调用本地设备接口的模块,可以调用70+个常用设备接插件

ngCordova的安装配置

官网提供了两种安装的方法:
1. 使用bower来安装
2. 下载zip文件

bower简介:

Bower是一个客户端技术的软件包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。

备工作:

  • 安装node环境:node.js
  • 安装Git,bower从远程git仓库获取代码包:git简易指南

装bower:

使用npm,打开终端,输入:

npm install -g bower

其中-g命令表示全局安装

安装ngCordova

进入到工程目录,使用bower工具安装:

bower install ngCordova

稍作等待,我们的ngCordova就安装好了。

我们查看一下我们的项目,发现ngCordova已经在“项目路径\www\lib”下面:

这里写图片描述

接着,将ng-cordova.js 或者 ng-cordova.min.js文件include到我们的index.html。

<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>

注意:ng-cordova.js文件必须在cordova.js之前并且在 AngularJS / Ionic文件之后(因为ngCordova depends on AngularJS)

在angular中添加ngCordova依赖

angular.module('myApp', ['ngCordova'])