Last active
August 15, 2017 10:36
Revisions
-
angular-academy-devs revised this gist
Jul 19, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,8 @@ imports: [ BrowserModule, AngularFireModule.initializeApp(firebaseConfig), AngularFireDatabaseModule, AngularFireAuthModule, RouterModule.forRoot(routerConfig) ], providers: [...], -
angular-academy-devs revised this gist
Jul 19, 2017 . 2 changed files with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ import {FirebaseApp} from "angularfire2"; @Injectable() export class LessonsService { constructor( @Inject(FirebaseApp) fb) { const rootDbRef = fb.database().ref(); 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ constructor( @Inject(FirebaseApp) fb) { const rootDbRef = fb.database().ref(); -
angular-academy-devs revised this gist
Oct 14, 2016 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ console.log("Running consumer ..."); const lessonsRef = database().ref("lessons"); const lessonsPerCourseRef = database().ref("lessonsPerCourse"); const queueRef = database().ref('queue'); const queue = new Queue(queueRef, function(data, progress, resolve, reject) { console.log('received delete request ...',data); ... complex business logic goes here ... }); -
angular-academy-devs revised this gist
Oct 14, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ requestLessonDeletion(lessonId:string, courseId:string) { this.db.child('queue/tasks').push({lessonId,courseId}) .then( () => alert('lesson deletion requested !') ); } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ { "-KT_udWMM0vKlnp-naE3": { "courseListIcon": "https://angular-academy.s3.amazonaws.com/main-logo/main-page-logo-small-hat.png", "description": "Angular 2 Tutorial For Beginners", "iconUrl": "https://angular-academy.s3.amazonaws.com/thumbnails/angular2-for-beginners.jpg", "longDescription": "Establish a solid layer of fundamentals, learn what's under the hood of Angular 2", "url": "getting-started-with-angular2" }, "-KT_udWj0knDpxHaxcKv": { "courseListIcon": "https://angular-academy.s3.amazonaws.com/course-logos/observables_rxjs.png", "description": "Angular 2 HTTP and Services", "iconUrl": "https://angular-academy.s3.amazonaws.com/thumbnails/services-and-http.jpg", "longDescription": "<p class='course-description'>Build Services using Observables, learn to use the HTTP module effectively.", "url": "angular2-http" } } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 18 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ import {firebaseConfig} from "./src/environments/firebase.config"; import {initializeApp, auth,database} from 'firebase'; initializeApp(firebaseConfig); auth() .signInWithEmailAndPassword('[email protected]', 'test123') .then(onLoginSuccess) .catch(onLoginError); function onLoginSuccess() { ... } function onLoginError() { ... } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ courses$.push({description: 'New Course'}) .then( () => console.log('item added'), -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,5 @@ courses$.push({description: 'New Course'}) .then( () => console.log('item added'), console.error ); -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ courses$.push({description: 'New Course'}) .then( () => console.log('item added'), console.error ); -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ findLessonById(lessonId:string):Observable<Lesson> { return this.db.object(`lessons/${lessonId}`) .map(Lesson.fromJson); } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 21 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import {Injectable} from '@angular/core'; import {Observable, Subject} from "rxjs/Rx"; import {Lesson} from "./lesson"; import {AngularFireDatabase} from "angularfire2"; @Injectable() export class LessonsService { constructor(private db:AngularFireDatabase) { } findAllLessons():Observable<Lesson[]> { return this.db.list('lessons') .do(console.log) .map(Lesson.fromJsonList); } }
-
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ constructor( @Inject(FirebaseRef) fb) { snap => console.log('Received the whole courses node',snap.val()) ); rootDebRef.child('lessons/-KT_udWS6pEmpLVrxlVw:').on('value', snap => console.log('Received lesson with a given Id',snap.val()) ); } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,8 @@ constructor( @Inject(FirebaseRef) fb) { const rootDbRef = fb.database().ref(); rootDebRef.child('courses').on('value', snap => console.log('Received the whole courses node',snap.val()) ); rootDebRef.child('lessons/-KT_udWS6pEmpLVrxlVw:').on('value', snap => console.log('Received the whole courses node',snap.val()) ); -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,3 +8,4 @@ constructor( @Inject(FirebaseRef) fb) { snap => console.log('Received the whole courses node',snap.val()) ); } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ constructor( @Inject(FirebaseRef) fb) { const rootDbRef = fb.database().ref(); rootDebRef.child('courses').on('value', snap => console.log('Received the whole courses node',snap.val()) ); rootDebRef.child('lessons/-KT_udWS6pEmpLVrxlVw:').on('value', snap => console.log('Received the whole courses node',snap.val()) ); } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,8 @@ export class LessonsService { const rootDbRef = fb.database().ref(); rootDebRef.on('value', snapshot => console.log(snapshot.val())); ... } -
angular-academy-devs renamed this gist
Oct 13, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ import {FirebaseRef} from "angularfire2"; @Injectable() export class LessonsService { constructor( @Inject(FirebaseRef) fb) { const rootDbRef = fb.database().ref(); ... } } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ], imports: [ BrowserModule, AngularFireModule.initializeApp(firebaseConfig), RouterModule.forRoot(routerConfig) ], providers: [...], -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ @NgModule({ declarations: [ AppComponent, ... ], imports: [ BrowserModule, AngularFireModule.initializeApp(firebaseConfig, authConfig), RouterModule.forRoot(routerConfig) ], providers: [...], bootstrap: [AppComponent] }) export class AppModule { } -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,3 +11,5 @@ export const firebaseConfig = { initializeApp(firebaseConfig); database().ref().on('value', snapshot => console.log(snapshot.val())); -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ import {initializeApp,database} from 'firebase'; export const firebaseConfig = { apiKey: "AIzaSyA0BcUcu4V8aHT_gM-32BhRcmqji4z-xts", authDomain: "some-app.firebaseapp.com", databaseURL: "https://some-app.firebaseio.com", storageBucket: "some-app.appspot.com", messagingSenderId: "290354329699" }; initializeApp(firebaseConfig); database().ref().on('value', snapshot => console.log(snapshot.val())); -
angular-academy-devs revised this gist
Oct 13, 2016 . 1 changed file with 27 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ { "url": "angular2-hello-world-write-first-application", "description": "Angular 2 Tutorial For Beginners - Build Your First App - Hello World Step By Step", "duration": "2:49", "tags": "BEGINNER", videoUrl: "https://www.youtube.com/embed/du6sKwEFrhQ", "longDescription": "This is step by step guide to create your first Angular 2 application. Its aimed at beginners just starting out with the framework.This lesson will show how to create a component, and how to link the component to a given custom HTML tag. It will show how to give the component a given template." lessons: [ { "url": "angular2-hello-world-write-first-application", "description": "Angular 2 Tutorial For Beginners - Build Your First App - Hello World Step By Step", "duration": "2:49", "tags": "BEGINNER", videoUrl: "https://www.youtube.com/embed/du6sKwEFrhQ", "longDescription": "This is step by step guide to create your first Angular 2 application. Its aimed at beginners just starting out with the framework.This lesson will show how to create a component, and how to link the component to a given custom HTML tag. It will show how to give the component a given template." }, { "url": "angular2-build-your-first-component", "description": "Building Your First Angular 2 Component - Component Composition", "duration": "2:07", "tags": "BEGINNER", videoUrl: "https://www.youtube.com/embed/VES1eTNxi1s", "longDescription": "In this lesson we are going to see how to include a component inside another component. We are going to create a simple search box component and include it in our main application." }, ... ] } -
angular-academy-devs revised this gist
Oct 13, 2016 . No changes.There are no files selected for viewing
-
angular-academy-devs created this gist
Oct 13, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ { "url": "angular2-hello-world-write-first-application", "description": "Angular 2 Tutorial For Beginners - Build Your First App - Hello World Step By Step", "duration": "2:49", "tags": "BEGINNER", videoUrl: "https://www.youtube.com/embed/du6sKwEFrhQ", "longDescription": "This is step by step guide to create your first Angular 2 application. Its aimed at beginners just starting out with the framework.This lesson will show how to create a component, and how to link the component to a given custom HTML tag. It will show how to give the component a given template." }