Angular & ionic项目小白总结一些踩过的坑
来源:互联网 发布:上海大陆期货交易软件 编辑:程序博客网 时间:2024/06/05 12:39
最近的一些很蠢很蠢的坑~~~
angular http-server采用ctrl+z关闭之后不能成功启动
原因是ctrl+c才能正确关闭。ctrl+z没有正确关闭
ionic run android 报错
Error: No emulator images (avds) found.
1. Download desired System Image by running: /Users/lulifei/develop/android-sdk-macosx/tools/android sdk
2. Create an AVD by running: /Users/lulifei/develop/android-sdk-macosx/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
找不到设备
将USB试模式设置为媒体设备就好
error:[$compile:ctreq] http://errors.angularjs.org/1.5.9/$compile/ctreq?p0=stTable&p1=stSearch
at http://localhost:8888/lib/js/main.min.js:2:412
at X (http://localhost:8888/lib/js/main.min.js:3:2101)
at p (http://localhost:8888/lib/js/main.min.js:2:31411)
at a (http://localhost:8888/lib/js/main.min.js:2:27317)
at a (http://localhost:8888/lib/js/main.min.js:2:27334)
at a (http://localhost:8888/lib/js/main.min.js:2:27334)
at a (http://localhost:8888/lib/js/main.min.js:2:27334)
at a (http://localhost:8888/lib/js/main.min.js:2:27334)
at p (http://localhost:8888/lib/js/main.min.js:2:31316)
at a (http://localhost:8888/lib/js/main.min.js:2:27317) <div class="widget" ng-transclude="">
(anonymous) @ main.min.js:3
错误
没有在表格上加st-table="rowCollection"
smart-table在search的时候输入内容不识别
原因:
加入st-table="displayedCollection" st-safe-src="rowCollection"
其中,"displayedCollection”是在html里的,"rowCollection”是在js里赋值的
注意对齐head和body的元素
登录报错404 not found
cordova plugin remove cordova-plugin-whitelist
then renstalled it
cordova plugin add cordova-plugin-whitelist
BarcodeScanner is not defined;
参照网上教程:
https://forum.ionicframework.com/t/cannot-read-property-barcodescanner-of-undefined-cordova/5290/3
项目路径下运行
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
ReferenceError: baidu_location is not defined
at Scope.$scope.tirarFoto (file:///android_asset/www/js/lotsearch.js:21:6)
at fn (eval at <anonymous>
安装以下插件
http://blog.csdn.net/zhang_shi_yu920/article/details/51469329
Uncaught TypeError: n.go is not a function
at Object.success (dashboard.min.js:3)
at fire (jquery-latest.js:3119)
at Object.fireWith [as resolveWith] (jquery-latest.js:3231)
at done (jquery-latest.js:9275)
at XMLHttpRequest.callback (jquery-latest.js:9685)
$cookieStore’在controller里的去掉,即可识别
不识别QRCode
TypeError: jQuery(...).qrcode is not a function
at r (http://localhost:8888/js/dashboard.min.js:13:54)
at new QRCtrl
换插件;
载入的时候没用画出来;设置ng-init
bad request
没有解析成json
data: JSON.stringify(data),
parseInt
parseFloat
文件上传upload不识别
安装bower install ng-file-upload —save
参考网址
https://github.com/danialfarid/ng-file-upload
bower install和npm install安装插件的时候
在项目根目录下采用bower install 和npm install安装到项目的不同位置,
采用bower install安装到bower_compents中,
采用nam install安装到node_modules中,
但是在项目中引用的时候安装在node_modules中不能找到
需要安装到bower_compents中。
解决:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
vi /etc/profile
sudo vi ~/.bashrc
Password:
$ sudo vi ~/.bashrc
$ vi .bash_profile
$ npm config get globalconfig
/usr/local/etc/npmrc
/usr/local/lib/node_modules
export NODE_PATH=/usr/lib/node_modules:$NODE_PATH
参考:
[1]http://stackoverflow.com/questions/33248577/trying-to-setup-sort-on-a-table-using-smart-table-in-angularjs
[2]https://forum.ionicframework.com/t/cannot-read-property-barcodescanner-of-undefined-cordova/5290/3
[3]http://blog.csdn.net/zhang_shi_yu920/article/details/51469329
[4]https://github.com/danialfarid/ng-file-upload
- Angular & ionic项目小白总结一些踩过的坑
- ionic+angular项目总结一
- angular的服务小总结
- 项目无法导入,关于Gradle踩过的一些坑
- 项目无法导入,关于Gradle踩过的一些坑
- angular js(2)和ionic(2)的总结
- 简要总结我做过的一些项目
- 前端总结:踩过的坑以及一些冷知识
- Angular的一些坑
- ionic创建项目遇到的一些问题
- 关于angular的一些小笔记
- 关于ionic开发的一些总结(项目启动设置,app图标名称更改)
- 一个小项目后的一些技术小总结
- 踩过的一些坑。
- angular一些小知识
- angular js和一些个人总结小技巧
- 收集关于angular的一些常见问题 总结
- ionic项目总结
- iOS真机调试步骤(Xcode8.0以上版本)
- java面试常见基础知识点(一)
- php的4种常用运行方式
- 3.C++ 函数返回值、函数调用(普通、嵌套、递归调用)
- Installing the .NET Framework 3.5 on Windows 8, Windows 8.1 and Windows 10
- Angular & ionic项目小白总结一些踩过的坑
- 在jsp任务位置加上今天的日期
- 密集匹配实验数据共享
- centOS防火墙中端口的开启和关闭
- QTreeView 设置水平滚动条
- bzoj 4145 [AMPPZ2014]The Prices dp
- 1039. 到底买不买(20)
- android okhttp get 请求带参数
- OpenSSL命令之算法类大全