我使用Ionic Tabs Component生成了一个应用程序.
标签是交货,关于和联系.
然后我生成了一个页面细节.
我希望页面详细信息成为" 交付"选项卡的子项.
当我在详细信息页面上时,我正在浏览交付选项卡.
有人在Ionic Forum上提出了类似的问题
生成的目录结构:
- about
- contact
- deliveries
deliveries.module.ts
- details
details.module.ts
- tabs
tabs.module.ts
tabs.page.html
tabs.router.module.ts
app.module.ts
app-routing.module.ts
Run Code Online (Sandbox Code Playgroud)
这是生成的app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{ path: '', loadChildren: './tabs/tabs.module#TabsPageModule' },
];
@NgModule({
imports: [
RouterModule.forRoot(routes)
],
exports: [RouterModule]
}) …Run Code Online (Sandbox Code Playgroud) 我正在尝试为我的 ionic 4 应用程序创建标签页布局。在我的配置和设置之后,我收到错误错误:无法匹配任何路由。URL 段:“标签”
首先,当我使用标签模板创建默认启动器时,它不起作用。选项卡栏显示但不显示选项卡内容。经过几天的研究和测试,还没有运气。看看我现在有什么;
我的离子信息
Ionic:
ionic (Ionic CLI) : 4.6.0 (C:\Users\Ken\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.17
@angular-devkit/build-angular : 0.10.7
@angular-devkit/schematics : 7.0.7
@angular/cli : 7.0.7
@ionic/angular-toolkit : 1.2.0
System:
NodeJS : v10.13.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
Run Code Online (Sandbox Code Playgroud)
app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{
path: '',
redirectTo: 'home',
pathMatch: 'full'
},
{
path: 'home',
loadChildren: './home/home.module#HomePageModule'
},
{ path: 'tabs', …Run Code Online (Sandbox Code Playgroud) 我正在尝试在ionic 4的app.component中获取当前页面实例。
在ionic 3中,我可以这样做
this.nav.getActive()。instance
我正在寻找一种“离子启动”项目并将其保存在现有Angular CLI解决方案(已经包含一个Web应用程序和一个lib)的projects文件夹中的方法。
在Ionic v4中,当我运行以生产模式捆绑的应用程序时(离子cordova构建android --prod),控制台会说“找不到cordova.js脚本标记。插件加载可能会失败。应用程序的某些内容(如字体)将被卸载(我看到的是Roboto Font,而不是我的自定义字体)。否则,当我试图在没有生产模式的情况下编译**(离子Cordova构建android)**时,该应用程序运行时没有控制台错误。
我的离子信息:
ionic(Ionic CLI):4.12.0 Ionic Framework:@ ionic / angular 4.2.0 @ angular-devkit / build-angular:0.13.8 @ angular-devkit / schematics:7.2.4 @ angular / cli:7.3.8 @离子/角度工具包:1.4.1
科尔多瓦:
cordova(Cordova CLI):8.1.2(cordova-lib@8.1.1)Cordova平台:android 7.1.4 Cordova插件:cordova-plugin-ionic-keyboard 2.1.3,cordova-plugin-ionic-webview 3.1.2, (以及其他7个插件)
有人也面临这个问题吗?
干杯,
我有以下几点:
Ionic:
ionic (Ionic CLI) : 4.7.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.1.2
@angular-devkit/build-angular : 0.13.7
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.7
@ionic/angular-toolkit : 1.4.1
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4, browser 5.0.4, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 10 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/pds/Library/Android/sdk)
NodeJS : v11.6.0 (/usr/local/bin/node)
npm : 6.5.0-next.0
OS : macOS Mojave
Xcode : Xcode 10.2 Build version 10E125
Run Code Online (Sandbox Code Playgroud)
根据此文档:https://ionicframework.com/docs/api/item#detail-arrows,为了不在 …
什么地方出了错? org.gradle.api.internal.tasks.DefaultTaskContainer $ DuplicateTaskException:无法添加任务'processDebugGoogleServices',因为具有该名称的任务已经存在。
I want to test firebase FCM plugin, but it seems to have a lot of errors,
after solved many of them, here what I'm trying to do: ionic cordova build
android, I have this error:
Run Code Online (Sandbox Code Playgroud)
离子信息:
platform \ android \ cordova-plugin-fcm-with-依赖性更新:
buildscript {
repositories {
mavenCentral()
jcenter()
mavenLocal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.google.gms:google-services:3.1.+'
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile 'com.google.firebase:firebase-core:10.+'
}
// apply plugin: 'com.google.gms.google-services'
// class …Run Code Online (Sandbox Code Playgroud) 我需要设置一个自定义图标来进行离子选择。以下是我的代码和输出
<ion-item class="input-container" align-items-center no-padding>
<ion-label position="floating" no-margin no-padding>I am a</ion-label>
<ion-select formControlName="role" mode="ios" okText="Okay" cancelText="Cancel">
<ion-select-option value="Admin">Admin</ion-select-option>
<ion-select-option value="Customer">Customer</ion-select-option>
</ion-select>
<ion-icon color="primary" name="arrow-down" mode="ios" slot="end"></ion-icon>
</ion-item>
Run Code Online (Sandbox Code Playgroud)
有没有其他设置自定义图标的方法,或者任何人都可以建议如何删除 select-icon-inner
我的应用程序ionic 4中有问题,当我运行时ionic cordova platform add android出现此错误:
[ERROR] cordova-res was not found on your PATH. Please install it globally:
npm i -g cordova-res
Run Code Online (Sandbox Code Playgroud)
而且当我运行时,npm i -g cordova-res我无法安装它。如何解决这个问题呢?
我工作的一个项目,react使用typescript,我有一个坏的时间弄清楚为什么这个错误发生的事情,我基本上不能使用任何createContext的例子,我在互联网上找到,因为这一点。我具体是从这里获得的:https : //github.com/typescript-cheatsheets/react-typescript-cheatsheet我正在尝试使用“上下文”部分中显示的内容。
import * as React from "react";
export function createCtx<A>(defaultValue: A) {
type UpdateType = React.Dispatch<React.SetStateAction<typeof defaultValue>>;
const defaultUpdate: UpdateType = () => defaultValue;
const ctx = React.createContext({
state: defaultValue,
update: defaultUpdate
});
function Provider(props: React.PropsWithChildren<{}>) {
const [state, update] = React.useState(defaultValue);
return <ctx.Provider value={{ state, update }} {...props} />;
}
return [ctx, Provider] as [typeof ctx, typeof Provider];
}
Run Code Online (Sandbox Code Playgroud)
问题是,每次它说有此错误时,都无法ctx在行中找到名称空间:
return <ctx.Provider value={{ state, update }} {...props} …Run Code Online (Sandbox Code Playgroud) ionic4 ×10
angular ×5
cordova ×2
typescript ×2
android ×1
angular-cli ×1
angular6 ×1
css ×1
ionic-cli ×1
ios ×1
javascript ×1
reactjs ×1