This file contains 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
// hide-header.directive.ts - this directive will do the actual job to hide header on content scroll in Ionic Framework. | |
import { Directive, HostListener, Input, OnInit, Renderer2 } from '@angular/core'; | |
import { DomController } from '@ionic/angular'; | |
@Directive({ | |
selector: '[appHideHeader]' | |
}) | |
export class HideHeaderDirective implements OnInit { |
This file contains 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
{ | |
"hosting": { | |
"public": "www", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"headers": [ | |
{ |
This file contains 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
// home.page.ts | |
import { Component } from '@angular/core'; | |
import { AngularFireMessaging } from '@angular/fire/messaging'; | |
@Component({ | |
selector: 'app-home', | |
templateUrl: 'home.page.html', | |
styleUrls: ['home.page.scss'], | |
}) | |
export class HomePage { |
This file contains 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
/* | |
file-name: app.component.ts | |
The important code for logging-in, signing-up or logging-out are: | |
— import 'AuthService' at line no. 17 | |
— declare variable 'email' and 'password' at line no. 25-26 | |
— inject service 'authService' at line no. 45 | |
— method for signup() at line no. 57 | |
— method for login() at line no. 62 | |
— method for logout() at line no. 67 |
This file contains 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
/* | |
file-name: home.page.ts | |
The code for copyToClipboard() are at line no. 34-39 | |
*/ | |
import { Component } from '@angular/core'; | |
import { AngularFireMessaging } from '@angular/fire/messaging'; | |
import { Plugins } from '@capacitor/core'; | |
@Component({ | |
selector: 'app-home', |
This file contains 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
/* | |
file-name: home.page.ts | |
The code to getCurrentPosition() is at line no. 44-47 | |
The code to watchPosition() is at line no. 50-54 | |
*/ | |
import { Component } from '@angular/core'; | |
import { AngularFireMessaging } from '@angular/fire/messaging'; | |
import { Plugins } from '@capacitor/core'; | |
const { Geolocation, Clipboard } = Plugins; |
This file contains 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 * as functions from 'firebase-functions'; | |
// What this function does -> Image Resizing With a Firebase Cloud Storage Function | |
// The single most common Cloud Function use-case for a storage bucket is to resize images to thumbnails in the background. | |
// Note: various modifications done in this code to get this code working without errors. | |
import { Storage } from '@google-cloud/storage'; | |
const gcs = new Storage(); |
This file contains 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
Show hidden characters
{ | |
"compilerOptions": { | |
"lib": ["es6"], | |
"module": "commonjs", | |
"noImplicitReturns": true, | |
"outDir": "lib", | |
"sourceMap": true, | |
"target": "es6", | |
"skipLibCheck": true | |
}, |
This file contains 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
<!-- | |
file-name: app.component.html | |
The important code for logging-in, signing-up or logging-out are from line no. 08 to 29 | |
— rest you can manage yourself based on user is logging-in or logging-out | | |
you can any time check user logging-in/out status using *ngIf="!(authService.user | async)" | |
--> | |
<ion-app> | |
<ion-content padding> | |
<h1 *ngIf="authService.user | async"> | |
Welcome {{ (authService.user | async)?.email }}! |
OlderNewer