-1

Ionic 2.0 と AngularJS 2.0 に取り組んでいますが、コンポーネントの「ドロップ メニュー」が機能しません。すべてのコードはhttps://github.com/aaronchen2k/test/tree/master/appにあります

tabs.html

<drop-menu></drop-menu>

dropmenu.js

import {Component} from 'angular2/core';

@Component({
  selector: 'drop-menu',
  templateUrl: 'build/components/dropmenu/dropmenu.html'
})
export class DropMenuComponent {
  constructor() {

  }
}
4

2 に答える 2

0

コードを調べると、コンポーネントが機能しており、名前と画像がここにあります。cssとIonicタグの使い方の問題です。

コンポーネントをどこに表示しますか? 他の 4 つのタブと同じ列に並んでいますか? ヘッダーに? そうしないと ?

于 2016-02-04T07:00:39.540 に答える
0

欠落しているディレクティブ セクション

@Page({
   templateUrl: 'build/pages/tabs/tabs.html',
   directives: [DropmenuComponent],
   providers: [CategoryService]
})
于 2016-02-05T01:07:24.620 に答える