当键盘显示时,我希望我的消息输入栏浮动在键盘上方,但看起来在Ionic 2中没有键盘附加指令(如v1)(可能在工作中?).有没有替代/解决方法?
目前的行为:
通缉行为:
这是我的消息输入栏的代码:
<ion-toolbar position="bottom" *ngIf="userIsAdmin">
<form (ngSubmit)="onSubmit(f)" #f="ngForm" class="message-form">
<ion-badge class="message-form-badge">Admin</ion-badge>
<ion-input type="text" placeholder="Type a message..." ngControl="messageInput"></ion-input>
<button type="submit" small class="message-form-button">Send <ion-icon name="send"></ion-icon></button>
</form>
</ion-toolbar>
Run Code Online (Sandbox Code Playgroud) 我正在尝试cordova build --release android使用Mac上的" "命令从Ionic项目获取APK文件但它不起作用,因为我收到此错误
"错误:源路径不存在:resources\android\icon\drawable-hdpi-icon.png"
.谁知道它可能来自哪里?
这是config.xml文件的副本:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.rise268787" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>RISE</name>
<description>
Discover music as you go
</description>
<author email="infos@olivierlam.fr" href="http://olivierlam.fr/">
Olivier Lam
</author>
<content src="index.html" />
<access origin="*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="orientation" value="portrait" />
<preference name="SplashScreenDelay" value="1000" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="1000" /> …Run Code Online (Sandbox Code Playgroud) 我正在Ionic的页面导航工作.使用后ionic serve,我收到此错误:
The Page with .ts extension has a @IonicPage decorator, but it does not have a corresponding "NgModule".
任何人都可以解释为什么我收到此错误.
当我们不想重新启动已经缓存的任务时,毫无疑问我们将会使用ionDidLoad.
现在,我们假设我们每次进入视图时都需要执行任务,我们如何在使用ionViewWillEntervs 之间做出选择ionViewDidEnter.
我没有找到任何明确的指导方针.
例如:
1)获取navParams
2)调用REST api
3)声明变量
4)完全加载DOM元素后启动一些东西(例如:google map init)
附加说明:
我注意到要在离子文档中明确写出答案.我打算知道的是,如果放入ionViewWillEntervs, 有什么优点和缺点ionViewDidEnter
例如:启动ionViewDidEnter将导致一些延迟(例如,我不确定这一点) - 即使是微不足道的
我正在使用 Ionic 和 Capacitor 开发一个应用程序。构建是使用 Ionic 的新 AppFlow 服务生成的,所以我不在本地构建它们。
如何更新 iOS 和 Android 版本号?我已经尝试更新 plist 和 config.xml,但无论我做什么,所有更新都会导致版本号为“1.0”。
只是学习使用Ionic来构建混合应用程序,并且无法在ionic prepare命令中找到大量信息.有人碰巧知道它是什么或者它和它之间有什么区别ionic build?
我目前正在浏览网页以获取信息,目的是构建经典棋盘游戏的Web和移动版本.
我们的想法是在桌面版本上拥有完整的功能和游戏,以及一个简单的原生移动应用程序,它将允许用户玩游戏并更改一些设置.
现在,我习惯于为桌面构建Web应用程序,但我从未接触过像Cordova/Ionic这样的东西.
我还想补充一点,我确实打算有一天将应用程序投入生产.
我有几个问题:
我正在尝试从任何使用过上述任何技术的人那里收集尽可能多的信息,所以请随意回答这篇文章的部分内容,以便我可以编译所有内容.
非常感谢您的时间和帮助
我正在尝试将Ionic.io Push添加到我的应用程序,但它的投射离子没有定义
ReferenceError: Ionic is not defined
var push = new Ionic.Push({
Run Code Online (Sandbox Code Playgroud)
一切正常,除了这个未定义的错误,我运行此命令更新lib但没有任何反应,捆绑版本是*Ionic,v1.1.0
ionic lib update
Run Code Online (Sandbox Code Playgroud)
我的app.js.
angular.module('TestApp', ['ionic','ionic.service.core',
'ionic.service.push',
'lavoApp.controllers',
'lavoApp.services','ngCordova'])
.run(function($ionicPlatform,$rootScope,$location,$timeout,$anchorScroll,$state,$ionicHistory,$cordovaPush) {
$ionicPlatform.ready(function() {
var push = new Ionic.Push({
"debug": true
});
push.register(function(token) {
console.log("Device token:",token.token);
});
Run Code Online (Sandbox Code Playgroud) 我想在每次页面更改时执行一些代码.
我可以ngOnDestroy为每个页面添加一个方法.似乎我可以使用Ionic 2页面生命周期钩子(例如ionViewDidUnload)获得完全相同的效果,但我没有费心去测试它.我宁愿在主app类中添加一个方法.
我看到你可以订阅Angular 2 路由器事件.如何翻译用于Ionic 2?我首先得到一个错误import { Router } from '@angular/router;:
TypeScript error: <path>/node_modules/@angular/router/src/common_router_providers.d.ts(9,55): Error TS2305: Module '"<path>/node_modules/@angular/core/index"' has no exported member 'NgModuleFactoryLoader'.
TypeScript error: <path>/node_modules/@angular/router/src/router.d.ts(14,39): Error TS2305: Module '"<path>/node_modules/@angular/core/index"' has no exported member 'NgModuleFactoryLoader'.
TypeScript error: <path>/node_modules/@angular/router/src/router_module.d.ts(9,10): Error TS2305: Module '"<path>/node_modules/@angular/core/index"' has no exported member 'ModuleWithProviders'.
Run Code Online (Sandbox Code Playgroud)
webpack配置
var path = require('path');
module.exports = {
entry: [
path.normalize('es6-shim/es6-shim.min'),
'reflect-metadata',
path.normalize('zone.js/dist/zone'),
path.resolve('app/app.ts')
],
output: {
path: path.resolve('www/build/js'),
filename: 'app.bundle.js',
pathinfo: false …Run Code Online (Sandbox Code Playgroud) ionic-framework ×10
cordova ×5
angular ×4
ionic2 ×3
typescript ×3
android ×2
angularjs ×2
apk ×2
ionic3 ×2
capacitor ×1
ionic4 ×1
javascript ×1
reactjs ×1