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
// In app.component or relevant component requiring icon | |
import { faGoogle } from '@fortawesome/free-brands-svg-icons'; | |
/*...*/ | |
constructor( | |
_iconService: IconService | |
) { | |
_iconService.addSvg(faGoogle); // add icon to library | |
} | |
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 { Injectable } from '@angular/core'; | |
import { MatIconRegistry } from '@angular/material'; | |
import { DomSanitizer } from '@angular/platform-browser'; | |
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class IconService { | |
constructor(private _iconRegistry: MatIconRegistry, private _sanitizer: DomSanitizer) {} |
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
{ | |
"rulesDirectory": ["node_modules/codelyzer"], | |
"rules": { | |
"arrow-return-shorthand": true, | |
"callable-types": true, | |
"class-name": true, | |
"deprecation": { | |
"severity": "warn" | |
}, | |
"forin": 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
{ | |
"rules": { | |
"arrow-return-shorthand": true, | |
"callable-types": true, | |
"class-name": true, | |
"deprecation": { | |
"severity": "warn" | |
}, | |
"forin": true, | |
"interface-over-type-literal": 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
{ | |
"rules": { | |
"arrow-return-shorthand": true, | |
"callable-types": true, | |
"class-name": true, | |
"deprecation": { | |
"severity": "warn" | |
}, | |
"forin": true, | |
"interface-over-type-literal": 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
{ | |
"printWidth": 120, | |
"singleQuote": true, | |
"useTabs": false, | |
"tabWidth": 2, | |
"semi": true, | |
"bracketSpacing": 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
import { Pipe, PipeTransform } from '@angular/core'; | |
/* | |
* Enables the key/value pair of an item to be | |
* visible within an ngFor | |
* Usage: | |
* value of iteratable | keyValue | |
* Example: | |
* <ul> | |
* <li *ngFor='key of demo | keyValue'> |
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 { Injectable } from '@angular/core'; | |
import { AppConfig } from '../app.config'; | |
import {UserAgentApplication} from 'msal'; | |
@Injectable() | |
export class MsalService { | |
accessToken: string; | |
userAgentApplication: UserAgentApplication = null; | |
constructor() { | |
this.userAgentApplication = new UserAgentApplication( |