浏览代码

Go live button on the card for the teacher

master
kj1352 5 年前
父节点
当前提交
f8dab7f246
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. +8
    -1
      src/app/reusable-components/class-card-list/class-card-list.component.html
  2. +4
    -1
      src/app/reusable-components/class-card-list/class-card-list.component.ts

+ 8
- 1
src/app/reusable-components/class-card-list/class-card-list.component.html 查看文件

@@ -22,11 +22,18 @@
{{ class.classLevel }} {{ class.classLevel }}
</p> </p>
</div> </div>
<span *ngIf="class.classUrl">
<span *ngIf="class.classUrl && demoType === 'Student'">
<button class="view-button" <button class="view-button"
[routerLink]="[class.classUrl, class.classId]"> [routerLink]="[class.classUrl, class.classId]">
Watch Watch
</button> </button>
</span> </span>

<span *ngIf="class.isLive && demoType === 'Teacher'">
<button class="view-button"
[routerLink]="['/tabs/home']">
Go Live
</button>
</span>
</li> </li>
</ul> </ul>

+ 4
- 1
src/app/reusable-components/class-card-list/class-card-list.component.ts 查看文件

@@ -8,10 +8,13 @@ import { Component, OnInit, Input } from '@angular/core';
export class ClassCardListComponent implements OnInit { export class ClassCardListComponent implements OnInit {
@Input() classes: any; @Input() classes: any;
@Input() hasLive: boolean; @Input() hasLive: boolean;
demoType: string;


constructor() { }
constructor() {
}


ngOnInit(): void { ngOnInit(): void {
this.demoType = localStorage.demoType;
} }


} }