Add test
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma
2021-02-11 11:49:28 +01:00
parent 142a1c9e58
commit 231fbf9ee8
5 changed files with 26 additions and 14 deletions

View File

@@ -33,6 +33,11 @@ const routes = [
component: TestComponent,
outlet: 'app-menu'
},
{
path: '',
component: TestComponent,
outlet: 'notification-menu'
},
{
path: '',
component: LogoComponent,

View File

@@ -3,7 +3,7 @@
<fm-gradient-select [gradientItems]="gradientItems|async" [showLabel]="false" [showAdd]="true"></fm-gradient-select>
</div>
<div class="row mt-3">
<button class="btn btn-primary">Test</button>
<button class="btn btn-primary" (click)="onTest($event)">Test</button>
</div>
</div>

View File

@@ -1,6 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { ItemService} from '@farmmaps/common';
import { Observable} from 'rxjs';
import { commonActions } from '@farmmaps/common';
import { Store } from '@ngrx/store';
@Component({
selector: 'app-test',
@@ -11,10 +13,15 @@ export class TestComponent implements OnInit {
public gradientItems:Observable<any[]>
constructor(private itemService$:ItemService) {
constructor(private itemService$:ItemService,private store$:Store ) {
this.gradientItems = this.itemService$.getItemList("vnd.farmmaps.itemtype.gradient");
}
ngOnInit(): void {
}
onTest(Event) {
let a = {"unread":"1"}
this.store$.dispatch(new commonActions.NotificationEvent(a));
}
}