Преглед изворни кода

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 }}
</p>
</div>
<span *ngIf="class.classUrl">
<span *ngIf="class.classUrl && demoType === 'Student'">
<button class="view-button"
[routerLink]="[class.classUrl, class.classId]">
Watch
</button>
</span>

<span *ngIf="class.isLive && demoType === 'Teacher'">
<button class="view-button"
[routerLink]="['/tabs/home']">
Go Live
</button>
</span>
</li>
</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 {
@Input() classes: any;
@Input() hasLive: boolean;
demoType: string;

constructor() { }
constructor() {
}

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

}