Add a Scroll to top button when scrolling down.
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
@use "@angular/material" as mat; | |
@use "sass:map"; | |
@include mat.core(); | |
$primary-palette: ( | |
50: #fef7df, | |
100: #fdeaae, | |
200: #fcdc7a, | |
300: #fbd041, |
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
/utils/custom-validators.ts | |
export const confirmPasswords = (control: AbstractControl) => { | |
if (control.get('password').value !== control.get('confirmPassword').value) { | |
control.get('confirmPassword').setErrors({ passError: true }); | |
return { passError: true }; | |
} | |
return null; | |
}; |
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 {Directive, ElementRef, Input} from '@angular/core'; | |
@Directive({ | |
selector: '[background-image]' | |
}) | |
export class BackgroundImage { | |
private el: HTMLElement; | |
constructor(el: ElementRef) { | |
this.el = el.nativeElement; |
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
var glob = require('glob'); | |
var fs = require('fs'); | |
var replace = require('replace'); | |
// Find file(s) | |
glob('fileName.txt', function(err, files) { | |
if (err) { throw err; } | |
files.forEach(function(item, index, array) { | |
console.log(item + ' found'); |