Created
February 8, 2020 07:04
-
-
Save sagrawal31/86c03e22b8cd1690893058d5d7068561 to your computer and use it in GitHub Desktop.
Debugging components in Angular 9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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