Angular LMS app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

39 lines
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. }