Add example page for demonstrate implementations

This commit is contained in:
SondreB 2023-05-02 17:58:11 +02:00
parent ca31c46f00
commit 6313a7d48a
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF
4 changed files with 35 additions and 1 deletions

View File

@ -33,6 +33,7 @@ import { LoginComponent } from './connect/login/login';
import { CreateProfileComponent } from './connect/create/create'; import { CreateProfileComponent } from './connect/create/create';
import { EditorBadgesComponent } from './editor-badges/editor'; import { EditorBadgesComponent } from './editor-badges/editor';
import { BadgeComponent } from './badge/badge'; import { BadgeComponent } from './badge/badge';
import { ExampleComponent } from './example/example';
const routes: Routes = [ const routes: Routes = [
{ {
@ -245,7 +246,7 @@ const routes: Routes = [
}, },
{ {
path: 'about', path: 'about',
loadChildren: () => import('./about/about.module').then(m => m.AboutModule) loadChildren: () => import('./about/about.module').then((m) => m.AboutModule),
// component: AboutComponent, // component: AboutComponent,
// canActivate: [AuthGuard], // canActivate: [AuthGuard],
// resolve: { // resolve: {
@ -284,6 +285,14 @@ const routes: Routes = [
data: LoadingResolverService, data: LoadingResolverService,
}, },
}, },
{
path: 'example',
component: ExampleComponent,
canActivate: [AuthGuard],
resolve: {
data: LoadingResolverService,
},
},
{ {
path: 'queue', path: 'queue',
component: QueueComponent, component: QueueComponent,

View File

@ -111,6 +111,10 @@
<mat-icon>construction</mat-icon> <mat-icon>construction</mat-icon>
<span *ngIf="displayLabels">Development</span> <span *ngIf="displayLabels">Development</span>
</a> </a>
<a [routerLink]="['/example']" mat-menu-item (click)="toggleMenu()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active">
<mat-icon>construction</mat-icon>
<span *ngIf="displayLabels">Example</span>
</a>
<a [routerLink]="['/relays']" mat-menu-item (click)="toggleMenu()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active"> <a [routerLink]="['/relays']" mat-menu-item (click)="toggleMenu()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active">
<mat-icon>dns</mat-icon> <mat-icon>dns</mat-icon>
<span *ngIf="displayLabels">{{ 'App.Relays' | translate }}</span> <span *ngIf="displayLabels">{{ 'App.Relays' | translate }}</span>

View File

@ -0,0 +1,7 @@
<div class="feed-page">
<p>This example demonstrates how to do sorting, filtering, virtual scrolling, dynamic updates of complex data within Blockcore Notes.</p>
</div>
<div>
</div>

View File

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
import { ApplicationState } from '../services/applicationstate';
@Component({
selector: 'app-example',
templateUrl: 'example.html',
})
export class ExampleComponent implements OnInit {
constructor(private appState: ApplicationState) {}
ngOnInit() {
this.appState.updateTitle('Example');
}
}