[英]File toggle js isn't working in angular 6
我在主題城市主題中使用文件 toggle.js
在 html 聊天框img文件 toggle.js 硬代碼 => 運行良好。 但我使用代碼 angular 6 => toggle.js 不起作用
描述:當我點擊一個用戶名然后顯示聊天框
這是我的代碼(我使用硬編碼 && 代碼角度 6):
<a *ngFor="let item of data;" href="javascript:;"> => not working
<span class="status-online"></span>
<span>{{item.Username}}</span>
</a>
<a href="javascript:;"> => hardcode working
<span class="status-online"></span>
<span>Peter</span>
</a>
請幫幫我,謝謝
然后使用 EventEmitter 進行切換。 像下面這樣的東西。
appchild.component.ts
import { Component, Input, EventEmitter, Output } from '@angular/core';
@Component({
selector: 'app-child',
template: `<button class='btn btn-primary' (click)="handleclick()">Click me</button> `
})
export class AppChildComponent {
handleclick() {
// Add toggle code here or set the flag to show/hide
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.