ツールチップが機能していないようです。私はそれがなぜであるかわからない。既知の問題を探し回っていましたが、これまで何も見つかりませんでした。角2mdのツールチップが動作しない
基本的に、私はngForで潜水艦を作っています。すべての部門には独自のツールチップが必要です。 私は、私がMdIconsModuleを輸入していると私は最新バージョンを使用しているすべてのエラーを取得していないよ:2.0.0-beta.6
@角度@ /材料これがされて私のHTML
<div *ngIf="selectedAfdeling">
<h1>{{selectedAfdeling.afdelingsNaam}}</h1>
<md-grid-list cols="3" rowHeight="1:1">
<div *ngFor="let kamer of selectedAfdeling.kamers">
<md-grid-tile>
<div class="kamer" [style.width.px]="kamer.width" [style.height.px]="kamer.height"
[style.background-color]="getKleur(kamer)" [routerLink]="['/patient', kamer.patient.id]">
<div mdTooltip="Tooltip!" mdTooltipPosition="right">
<div class="kamernr" *ngIf="kamerNummer">{{kamer.kamernummer}}</div>
<div class="patientnaam" *ngIf="naam">{{kamer.patient.naam}}</div>
<div class="behandeling" *ngIf="type">{{kamer.patient.behandelingstype}}</div>
<div class="behandeling" *ngIf="tijd">{{kamer.patient.behandelingstijd}}</div>
<footer class="faciliteiten">
<span *ngIf="kinderruimte && kamer.kinderverzorgingsruimte"><md-icon>child_care</md-icon></span>
<span *ngIf="salon && kamer.salon"><md-icon>event_seat</md-icon></span>
<span *ngIf="sanitair && kamer.sanitair"><md-icon>wc</md-icon></span></footer>
</div>
</div>
</md-grid-tile>
</div>
</md-grid-list>
</div>
私はクロームの要素をチェックアウトされている、と私はtooltip要素を見つけた:
<div _ngcontent-c9="" mdtooltip="Tooltip!" mdtooltipposition="right" ng-reflect-position="right" ng-reflect-message="Tooltip!" style="touch-action: none; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
<!--bindings={
"ng-reflect-ng-if": "true"
}--><div _ngcontent-c9="" class="kamernr">3.011</div>
<!--bindings={
"ng-reflect-ng-if": "false"
}-->
<!--bindings={
"ng-reflect-ng-if": "false"
}-->
<!--bindings={
"ng-reflect-ng-if": "false"
}-->
<footer _ngcontent-c9="" class="faciliteiten">
<!--bindings={
"ng-reflect-ng-if": "false"
}-->
<!--bindings={
"ng-reflect-ng-if": "false"
}-->
<!--bindings={
"ng-reflect-ng-if": "false"
}--></footer>
</div>
module.ts:
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {ReactiveFormsModule} from '@angular/forms';
import {ColorPickerModule} from 'angular2-color-picker';
import {AppComponent} from './app.component';
import {AfdelingenComponent} from './afdelingen/afdelingen.component';
import {RouterModule} from "@angular/router";
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {
MdCoreModule,
MdInputModule,
MdSelectModule,
MdMenuModule,
MdSidenavModule,
MdToolbarModule,
MdCheckboxModule,
MdTabsModule,
MdButtonModule,
MdCardModule,
MdIconModule,
MdGridListModule,
MdTooltipModule,
MdSlideToggleModule,
MdNativeDateModule,
MdDatepickerModule,
} from '@angular/material';
import "hammerjs";
import {AfdelingService} from "./services/afdeling.service";
import {SidenavService} from './services/sidenav.service';
import {InstellingenComponent} from './instellingen/instellingen.component';
import {PatientComponent} from './patient/patient.component';
import { HomeComponent } from './home/home.component';
@NgModule({
declarations: [
AppComponent,
AfdelingenComponent,
InstellingenComponent,
PatientComponent,
HomeComponent
],
imports: [
BrowserModule,
MdCardModule,
FormsModule,
ReactiveFormsModule,
HttpModule,
BrowserAnimationsModule,
NoopAnimationsModule,
MdInputModule,
MdSelectModule,
MdCoreModule,
MdSidenavModule,
MdNativeDateModule,
MdMenuModule,
MdButtonModule,
MdCheckboxModule,
ColorPickerModule,
MdToolbarModule,
MdIconModule,
MdGridListModule,
MdDatepickerModule,
MdTooltipModule,
MdTabsModule,
MdSlideToggleModule,
RouterModule.forRoot([
{ path: 'afdelingen/:afdelingsNaam',component: InstellingenComponent },
{ path: 'patient/:id', component: PatientComponent},
{ path: '', component: HomeComponent}
])
],
providers: [AfdelingService, SidenavService],
bootstrap: [AppComponent]
})
export class AppModule {
}
いくつかのエラーが表示されているか、表示されていませんか? MdIconsModuleを素材からアプリケーションにインポートしますか?どのバージョンを使用していますか?より多くの情報が必要です:D –
ちょっとヨタ、あなたの迅速な答えに感謝します!私は何のエラーも出ません。私はMdIconsModuleをインポートしました。私は最新のバージョンを使用しています。 –
私は私のアプリケーションで似たようなものを持っていて、問題なく動作します。テンプレートから要素/ディレクティブを取り除き、何かがツールチップを表示していないかどうかを確認します。より多くのソースコードを助けることができる –