core/action-bar/action-bar.service.ts
A service which defines action-bar items via the multi provider concept.
```typescript
* // preferred way, multi provider concept:
* providers: [
* {
* provide: HOOK_ACTION_BAR,
* useValue: [{ template: SomeComponent, priority: 10, placement: 'left' } as ActionBarItem],
* multi: true
* }
* ]
*
* // use services:
* this.actionBarService.add({ template: SomeComponent, priority: 10, placement: 'left' });
* ```
Properties |
|
Methods |
Accessors |
add | ||||||||
add(item: ActionBarItem)
|
||||||||
Adds a new item to the action bar in the header and emits a state change.
Parameters :
Returns :
void
|
refresh |
refresh()
|
Refreshes the current store.
Returns :
void
|
remove | ||||||||
remove(item: ActionBarItem)
|
||||||||
Removes an action bar item from the header and emits a state change.
Parameters :
Returns :
void
|
items$ |
items$:
|
Type : Observable<ActionBarItem[]>
|
Readonly refreshTrigger |
refreshTrigger:
|
Default value : new Subject()
|
Protected state$ |
state$:
|
Default value : new BehaviorSubject<Set<ActionBarItem>>(new Set<ActionBarItem>())
|
state |
getstate()
|
Returns the current state.
Returns :
Set<ActionBarItem>
|