gpt4 book ai didi

ios - ionic2 - 提供的参数与调用目标的任何签名都不匹配

转载 作者:行者123 更新时间:2023-11-29 00:37:10 24 4
gpt4 key购买 nike

我正在使用 3 个页面(采用、采用设计、采用邀请)navCtrl.push()前进和<button ion-fab mini navPop>弹出回到上一页。它在浏览器上运行良好。但是当我想为 iOS 构建时,我得到这个错误:

[10:22:20] Error: Error at /Users/xuanxi/Desktop/bitbuckets/meta/metatest/.tmp/pages/adopt-design/adopt-design.ngfactory.ts:402:29

[10:22:20] Supplied parameters do not match any signature of call target.
[10:22:20] Error at /Users/xuanxi/Desktop/bitbuckets/meta/metatest/.tmp/pages/adopt-invite/adopt-invite.ngfactory.ts:253:29

[10:22:20] Supplied parameters do not match any signature of call target.
[10:22:20] ngc failed

我正在使用 sidemenu模板,所以我怀疑它与 @ViewChild(Nav) nav: Nav; 有关和 this.nav.setRoot(page.component);app.component.ts但我不确定如何解决这个问题。以下是我的 adopt 代码和 adopt-design.ts :

采用.ts:

import { Component } from '@angular/core';

import { NavController, NavParams } from 'ionic-angular';
import { AdoptDesign } from '../adopt-design/adopt-design';

@Component({
selector: 'page-adopt',
templateUrl: 'adopt.html'
})
export class Adopt {
selectedItem: any;
icons: string[];
items: Array<{title: string, note: string, icon: string}>;

constructor(public navCtrl: NavController, public navParams: NavParams) {
this.selectedItem = navParams.get('item');
this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
'american-football', 'boat', 'bluetooth', 'build'];

this.items = [];
for (let i = 1; i < 3; i++) {
this.items.push({
title: 'Model ' + i,
note: 'input : ' + i,
icon: this.icons[Math.floor(Math.random() * this.icons.length)]
});
}
}

itemTapped(event, item) {
this.navCtrl.push(AdoptDesign, {
});
}
}

采用-design.ts:

import { Component } from '@angular/core';

import { NavController, NavParams } from 'ionic-angular';

import { AdoptInvite } from '../adopt-invite/adopt-invite';

@Component({
selector: 'page-adopt-design',
templateUrl: 'adopt-design.html'
})
export class AdoptDesign {

constructor(public navCtrl: NavController, public navParams: NavParams) {
}

gotoInvite(event) {
this.navCtrl.push(AdoptInvite, {
});
}
}

哪个adopt-design.ts有相似的结构。

我该如何解决?

最佳答案

gotoInvite(event?: Event) {
this.navCtrl.push(AdoptInvite, {});
}

就这样吧。论据辅助时使用问号。它对我有用。

关于ios - ionic2 - 提供的参数与调用目标的任何签名都不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40335936/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com