We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just replace the existing code with the ones below:
external.component.html
<div class="splash-content flex-layout-column flex-center-center"> <div class="splash-logos flex-layout-row flex-center-center"> <img [src]="brand.brandLogo" alt="logo"/> <i aria-hidden="true" class="fa fa-arrow-alt-circle-right success-text"></i> <img [src]="website.logo" alt="partner" onerror="this.src='./assets/common/globe.png'"/> </div> <div class="alert-with-icon"> <i aria-hidden="true" class="fas fa-info fa-lg fa-fw success-text"></i> <p> {{ info }} </p> <br /> <p> {{ 'Will be redirected to: ' }}<br/><a class="link green-theme" (click)="redirect()">{{ href }}</a> </p> </div> <div class="external-component-button-wrapper"> <app-button1 [text]="'Home'" [lighterContrast]="true" [themeColor]="ThemeColorSettings.green" [isSleekButton]="true" transparent="true" [routerLink]="URLS.root"> </app-button1> <app-button1 [text]="'Proceed'" [lighterContrast]="true" [themeColor]="ThemeColorSettings.green" [isSleekButton]="true" transparent="true" (click)="redirect()"> </app-button1> </div> </div>
external.component.ts
import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { environmentCommon } from '../../../../environments/environment-common'; import { ThemeColorSettings, URLS } from '../../../data/constant'; import { ThemeService } from '../../../service/theme/theme.service'; @Component( { selector: 'app-external', templateUrl: './external.component.html', styleUrls: [ './external.component.scss' ] } ) export class ExternalComponent { href: any; info: string; website: any; brand = { brandLogo: '', }; ThemeColorSettings = ThemeColorSettings; URLS = URLS; constructor( private route: ActivatedRoute, private router: Router, private themeService: ThemeService ) { this.brand = this.themeService.brand; this.route.queryParams.subscribe( params => { this.href = params.href; this.info = params.info; for ( const key in environmentCommon.website ) { if ( this.href.startsWith( environmentCommon.website[ key ].url ) ) { this.website = environmentCommon.website[ key ]; break; } } if ( !this.website ) { const url = new URL( this.href ); const favicon = 'https://www.google.com/s2/favicons?sz=64&domain=' + url.origin; this.website = { logo: favicon }; } } ); } redirect() { window.location.href = this.href; } }
The text was updated successfully, but these errors were encountered:
Branch feature/external-website-favicon-detection created!
Sorry, something went wrong.
Create draft PR for #98
c5fc663
fatihturker
Successfully merging a pull request may close this issue.
Open Template Hub - Feature Request
Description
Just replace the existing code with the ones below:
Supplementary Info
external.component.html
external.component.ts
The text was updated successfully, but these errors were encountered: