Skip to content

Instantly share code, notes, and snippets.

@sagrawal31
Created February 8, 2020 07:04
Show Gist options
  • Save sagrawal31/86c03e22b8cd1690893058d5d7068561 to your computer and use it in GitHub Desktop.
Save sagrawal31/86c03e22b8cd1690893058d5d7068561 to your computer and use it in GitHub Desktop.
Debugging components in Angular 9
<div class="page-layout simple fullwidth">
<div class="header accent p-24" fxLayout="row" fxLayoutAlign="start center">
<h2>{{title}}</h2>
</div>
<div class="content p-24">
<h1 class="m-0">Quick stats and links</h1>
<h4 class="secondary-text">coming soon..</h4>
</div>
</div>
import {Component} from '@angular/core';
import {Router} from '@angular/router';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss']
})
export class DashboardComponent {
title = 'Dashboard';
constructor(private router: Router) {
}
public goToFAQsPage() {
this.router.navigateByUrl('/admin/faq');
}
private alertFoo() {
window.alert('Isn\'t this cool?');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment