Angular LMS app
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.
 
 
 
 

39 rindas
938 B

  1. import { Component, OnInit } from '@angular/core';
  2. import { ActivatedRoute } from '@angular/router';
  3. import { Subscription } from 'rxjs';
  4. import { Location } from '@angular/common';
  5. @Component({
  6. selector: 'app-details',
  7. templateUrl: './details.component.html',
  8. styleUrls: ['./details.component.scss']
  9. })
  10. export class DetailsComponent implements OnInit {
  11. selectedSegment: string = 'forum';
  12. heading: string;
  13. routeSubscription: Subscription;
  14. selectedChapter: number = 1;
  15. showMorePostOptions: boolean = false;
  16. selectedPost: number;
  17. constructor(
  18. private route: ActivatedRoute,
  19. private location: Location
  20. ) { }
  21. ngOnInit(): void {
  22. this.routeSubscription = this.route.params.subscribe((params) => {
  23. this.heading = params['heading'];
  24. });
  25. }
  26. ngOnDestroy() {
  27. this.routeSubscription.unsubscribe();
  28. }
  29. back() {
  30. this.location.back();
  31. }
  32. }