标签: ionic-framework

如何修复:“@angular/fire”没有导出成员“AngularFireModule”.ts(2305) ionic、firebase、Angular

我正在尝试将我的应用程序与 firebase 数据库连接,但我在 app.module.ts 上收到 4 条错误消息:

'"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305),
'"@angular/fire/storage"' has no exported member 'AngularFireStorageModule'.ts(2305)
'"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.ts(2305)
'"@angular/fire/auth"' has no exported member 'AngularFireAuthModule'.ts(2305)
Run Code Online (Sandbox Code Playgroud)

这是我的 package.json 文件:

{
  "name": "gescable",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/architect": "^0.1202.5",
    "@angular-devkit/architect-cli": "^0.1202.5",
    "@angular/common": "~12.1.1",
    "@angular/core": "~12.1.1",
    "@angular/fire": "^7.0.4",
    "@angular/forms": "~12.1.1", …
Run Code Online (Sandbox Code Playgroud)

firebase typescript ionic-framework angular

36
推荐指数
4
解决办法
3万
查看次数

ionic serve显示多个地址,我选择了错误的一个...如何更改离子服务使用的地址?

我使用ionic serve并得到了以下响应,我没有三思而后行localhost.但是现在我想使用选项1. Ionic记得我的选择,以至于ionic serve永远不允许我再选择并使用localhost...

如何改变这一点,以便离子服务使用第一个选项?

Multiple addresses available.

Please select which address to use by entering its number from the list below:

 1) 192.168.2.10 (en0)
 2) localhost

Address Selection:  
Run Code Online (Sandbox Code Playgroud)

ionic-framework

35
推荐指数
2
解决办法
2万
查看次数

如何从mac中完全删除Ionic和Cordova安装?

如何从Mac完全删除Cordova和离子安装?我正在运行mac os Yosemite 10.10.2

javascript node.js cordova ionic-framework

35
推荐指数
4
解决办法
15万
查看次数

运行cordova build -release android时出错

我正按照此处的说明尝试发布我的Android应用:

http://ionicframework.com/docs/guide/publishing.html

但是,当我运行cordova build --release android时,我收到以下错误:

:lintVitalArmv7Release
/Users/xxx/Documents/xxx/xxx/platforms/android/res/values/arrays.xml:3: Error: "country_codes" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sv" (Swedish), "tr" (Turkish), "zh-rCN" (Chinese: China), "zh-rTW" (Chinese: Taiwan, Province of China) [MissingTranslation]
  <string-array name="country_codes"> …
Run Code Online (Sandbox Code Playgroud)

android cordova ionic-framework ionic

35
推荐指数
5
解决办法
2万
查看次数

上传离子应用时出错

背景:

  • 此应用程序最初上传到我的个人离子帐户
  • 该应用已从我的个人离子帐户中删除
  • 当我尝试使用我的工作离子帐户上传应用程序时会发生此错误

我的问题是,如何让应用程序上传到我的工作帐户?

$ ionic upload

Uploading app...
 ? App ID ae440d8c does not exist




Unable to upload app (CLI v1.4.5)

Your system information:

Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.2
Ionic CLI Version: 1.4.5
Ionic App Lib Version: 0.0.22
ios-deploy version: Not installed
ios-sim version: 3.1.1 
OS: Mac OS X Yosemite
Node Version: v0.12.1
Xcode version: Xcode 6.3.1 Build version 6D1002 
Run Code Online (Sandbox Code Playgroud)

ionic-framework ionic ionic-view

35
推荐指数
3
解决办法
2万
查看次数

如何在离子构建/运行时强制刷新缓存的源文件?

我有这个随机问题ionic buildionic run.

我注意到在编译期间它使用了我的源代码的缓存,因此在进行新的更改时,它不会反映重新编译应用程序.

所以我的问题是,如何清除构建文件的缓存?我已经尝试过,ionic state reset但它仍然无法正常工作,然后卸载然后从我的Android重新安装应用程序.

谢谢

cordova ionic-framework ionic

35
推荐指数
4
解决办法
7万
查看次数

$ state.go(app.location)和$ location.path("app/location")有什么区别?

我最近开始使用离子框架,它有角度js.要在屏幕之间导航,我使用$ location.path并且它工作得很好.但是,在我下载的一个例子中,我看到$ state.go被用来重定向到某个页面.我想知道两者之间的区别.

angularjs angular-ui-router ionic-framework

34
推荐指数
1
解决办法
2万
查看次数

Ionic 2,在iOS上使用Angular 2 Pipe break-"无法找到变量:Intl"

在模板中使用日期,百分比和货币管道时遇到同样的问题 -

例如,我使用的是简单的百分比管道:

{{ .0237| percent:'1.2-2' }}
Run Code Online (Sandbox Code Playgroud)

它在Chrome上运行时有效,但是当我部署到iOS设备时,它会抛出此错误:

"EXCEPTION:ReferenceError:无法找到变量:[{{{{{0237 |百分比:'1.2-2'}}中的Intl ......"

有没有其他人遇到这个问题?任何建议或帮助将不胜感激!谢谢!

ios ionic-framework ionic2 angular

34
推荐指数
2
解决办法
2万
查看次数

如何使用Type Script获取Ionic 2中的设备宽度和高度?

我试图使用打字稿获取离子2中的设备宽度和高度.

在以前版本的离子2我用过,

window.screen.width
window.screen.height
Run Code Online (Sandbox Code Playgroud)

但在较新版本中,这不起作用.

如何使用Type Script + ionic 2?

typescript ionic-framework ionic2 ionic3 angular

34
推荐指数
2
解决办法
3万
查看次数

package.json vs config.xml for cordova plugins

管理Cordova插件和平台的正确方法是什么?

在使用cordova@5.4.0&的项目中ionic-cli@1.7.8,我面临两种可能性:

与Cordova(config.xml)

cordova create dummy-project && cd dummy-project
cordova platform add browser --save
cordova plugin add cordova-plugin-device --save

## If forgot to add `--save` option, manually update config.xml
#cordova platform save
#cordova plugin save

# reset platforms & plugins, like we just checked out the repository
rm -rf platforms plugins

# `cordova prepare` automatically setup platforms & plugins
# dependencies via config.xml
cordova prepare
Run Code Online (Sandbox Code Playgroud)

优点

  • 平台和插件属于Cordova领域,因此使用cordova似乎很直观
  • 平台和插件版本保存config.xml如下:

    <plugin name="cordova-plugin-device" spec="~1.0.1" /> …
    Run Code Online (Sandbox Code Playgroud)

cordova ionic-framework cordova-plugins ionic

33
推荐指数
1
解决办法
1万
查看次数