@evan.network/ui-angular-core
Version:
The angular-core operates as an global and central library for the evan.network Angular 5 frontend development. Using this project you will be able to to the following things:
77 lines (76 loc) • 2.51 kB
TypeScript
import { // @angular/router
ElementRef, NgZone, ChangeDetectorRef } from 'angular-libs';
import { EvanDescriptionService } from '../../services/bcc/description';
import { EvanRoutingService } from '../../services/ui/routing';
import { EvanUtilService } from '../../services/utils';
/**
* Dynamic DApp loader component. Handles nested Angular DApps and loads the
* latest ens address within the url.
*
* Usage in angular html:
* <evan-dapp-loader></evan-dapp-loader>
*
* Usage as wildcard route for dynamic DApp registering:
* const routes: Routes = [
* ...,
* {
* path: '**',
* component: DAppLoaderComponent,
* data: {
* state: 'unkown',
* navigateBack: true
* }
* }
* ...
* ]
*
*
* @class Component DAppLoaderComponent
*/
export declare class DAppLoaderComponent {
private _ngZone;
private definitionService;
private elementRef;
private ref;
private routingService;
private utils;
/***************** variables *****************/
/**
* dapp that should be started (detected from url)
*/
private dappToStart;
/**
* Check if the current dapp was destroyed, to trigger dapp.nextDAppToLoad only once
*/
private dappWasLoaded;
/**
* save the latest ionic app element to prevent duplicated app starting thats are not destroyed
*/
private ionicAppElement;
/**
* was the component destroyed directly within a previous opened DApp was started? Could be
* possible, if two dapp-lower components are runned directly after another
*/
private destroyed;
/***************** initialization *****************/
constructor(_ngZone: NgZone, definitionService: EvanDescriptionService, elementRef: ElementRef, ref: ChangeDetectorRef, routingService: EvanRoutingService, utils: EvanUtilService);
/**
* Apply the DApp that should be started from window.location. Waits for other
* DApps that are within the opening process, wait for them and show the new
* DApp.
*/
ngAfterViewInit(): Promise<void>;
/**
* stop the angular application that is laoded dynamically
*/
ngOnDestroy(): Promise<void>;
/***************** functions *****************/
/**
* Start the current detected angular application.
*/
startDApp(): void;
/**
* Finish the dapp loading within startDApp or when the dapp was cicked through space.
*/
finishDAppLoading(): void;
}