Skip to content

Instantly share code, notes, and snippets.

View schirato's full-sized avatar

Erik Schirato schirato

View GitHub Profile
@katowulf
katowulf / app.component.ts
Last active February 3, 2021 15:09
Dynamically set page title based on active route in Angular 4
// This can probably be simplified somehow. Not sure why I need to add it in the component to init the service.
import { Component, OnInit } from '@angular/core';
import {TitleService} from "./@core/utils/title.service";
@Component({...})
export class AppComponent implements OnInit {
constructor(private titleService: TitleService) {...}