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 { MatInputModule, MatPaginatorModule, MatProgressSpinnerModule, | |
MatSortModule, MatTableModule } from "@angular/material"; | |
@NgModule({ | |
declarations: [ | |
... | |
], | |
imports: [ | |
BrowserModule, |
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
@Component({ | |
selector: 'app-root', | |
template: ` | |
<ng-template> | |
<button class="tab-button" | |
(click)="login()">{{loginText}}</button> | |
<button class="tab-button" | |
(click)="signUp()">{{signUpText}}</button> | |
</ng-template> |
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 {HttpClientModule} from '@angular/common/http'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
BrowserModule, | |
HttpClientModule | |
], |
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 {FirebaseApp} from "angularfire2"; | |
@Injectable() | |
export class LessonsService { | |
constructor( @Inject(FirebaseApp) fb) { | |
const rootDbRef = fb.database().ref(); | |
rootDebRef.on('value', snapshot => console.log(snapshot.val())); |
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
<section class="sample-app-content"> | |
<h1>Template-driven Form Example (with bi-directional data binding):</h1> | |
<form #myForm="ngForm" (ngSubmit)="onSubmitTemplateBased()"> | |
<p> | |
<label>First Name:</label> | |
<input type="text" | |
[(ngModel)]="user.firstName" required> | |
</p> | |
<p> | |
<label>Password:</label> |
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
{ | |
"name": "my-queue", | |
"version": "1.0.0", | |
"description": "My Queue", | |
"main": "queue_worker.js", | |
"dependencies": { | |
"firebase": "2.x", | |
"firebase-queue": "^1.0.0" | |
} | |
} |
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
function debugAccess(obj, prop, debugGet){ | |
var origValue = obj[prop]; | |
Object.defineProperty(obj, prop, { | |
get: function () { | |
if ( debugGet ) | |
debugger; | |
return origValue; | |
}, |