Files
agent/packages/uhk-web/src/app/components/add-on/add-on.component.ts
Róbert Kiss bb31c2cefa refactor: use rxjs pipe syntax (#900)
The `let` operator was not migrated because earlier two reducer needed be refactored
- user-configuration reducer
- present reducer

This commit is prerequisite of the angular upgrade.
2019-01-20 23:23:01 +01:00

26 lines
596 B
TypeScript

import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { pluck } from 'rxjs/operators';
@Component({
selector: 'add-on',
templateUrl: './add-on.component.html',
styleUrls: ['./add-on.component.scss'],
host: {
'class': 'container-fluid'
}
})
export class AddOnComponent {
name$: Observable<string>;
constructor(route: ActivatedRoute) {
this.name$ = route
.params
.pipe(
pluck<{}, string>('name')
);
}
}