Unposted Done!!

This commit is contained in:
tanshu
2020-05-14 16:33:08 +05:30
parent 0df442e541
commit 0a79b1acbb
5 changed files with 34 additions and 11 deletions

View File

@ -24,12 +24,7 @@ export class UnpostedComponent implements OnInit {
}
ngOnInit() {
this.route.data.pipe(map(
(data: { info: Unposted[] }) => {
data.info = data.info.map(x => ({...x, url: x['type'].replace(/ /g, '-').toLowerCase()}));
return data;
}
)).subscribe((data: { info: Unposted[] }) => {
this.route.data.subscribe((data: { info: Unposted[] }) => {
this.info = data.info;
});
this.dataSource = new UnpostedDataSource(this.paginator, this.sort, this.info);