私はこれの例としてIonicを使用していますが、これは一般的なAngular 2の問題です。角2のアクセスコンポーネントテンプレートで定義されています
page1.ts
import {Page} from 'ionic-angular';
@Page({
templateUrl: 'build/pages/page1/page1.html'
})
export class Page1 {
constructor() {
}
}
page1.html
<ion-navbar *navbar>
<ion-title>Tab 1</ion-title>
</ion-navbar>
<ion-content padding class="page1">
<ion-slides pager>
<ion-slide>
<h3>Thank you for choosing the Awesome App!</h3>
<p>
The number one app for everything awesome.
</p>
</ion-slide>
<ion-slide>
<h3>Using Awesome</h3>
<div id="list">
<h5>Just three steps:</h5>
<ol>
<li>Be awesome</li>
<li>Stay awesome</li>
<li>There is no step 3</li>
</ol>
</div>
</ion-slide>
<ion-slide>
<h3>Any questions?</h3>
</ion-slide>
</ion-slides>
</ion-content>
は、どのように私はプログラム的Page1のクラスのコンストラクタからion-slides
オブジェクトを参照しますか?
私は#referenceのいくつかの並べ替えを経由して想定していたが、私ははい、それは角度question.Youは、子コンポーネントにアクセスするために@ViewChildデコレータを使用することができます構文