我有一个页面,上面有两个组件:
Page({
template: '<ion-navbar *navbar class="contact_navbar">
<ion-title>Loan Calculator</ion-title>
</ion-navbar>
<ion-content><ck-auto-loan-calculator type="normal"></ck-auto-loan-calculator></ion-content><ck-keypad id="keypad"></ck-keypad>',
directives: [[ckAutoLoanCalculator], [Keypad]]
})
export class LoanCalculator {}
现在在 ck-auto-loan-calculator 我有一个按钮:(click)="showKeypad()"
showKeypad() 函数曾经有let k = this.app.getComponent('keypad');
,这是访问<ck-keypad>
组件
现在由于 ionic 更改为 beta 7 并且 angular 更改为 RC,我收到以下错误: ORIGINAL EXCEPTION: TypeError: Cannot read property 'setControl' of undefined
如何使键盘组件在 Ck-auto-loan-calculator 组件中可访问?
谢谢