Add test
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -33,6 +33,11 @@ const routes = [
|
||||
component: TestComponent,
|
||||
outlet: 'app-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: TestComponent,
|
||||
outlet: 'notification-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: LogoComponent,
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user