This commit is contained in:
Amritanshu
2019-06-23 01:35:00 +05:30
parent 20801afc8a
commit 142a0f5a8a
42 changed files with 1069 additions and 234 deletions

View File

@ -0,0 +1,27 @@
import { Component, OnInit } from '@angular/core';
import { SectionListDataSource } from './section-list-datasource';
import { Section } from '../../core/section';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-section-list',
templateUrl: './section-list.component.html',
styleUrls: ['./section-list.component.css']
})
export class SectionListComponent implements OnInit {
dataSource: SectionListDataSource;
list: Section[];
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
displayedColumns = ['name'];
constructor(private route: ActivatedRoute) {
}
ngOnInit() {
this.route.data
.subscribe((data: { list: Section[] }) => {
this.list = data.list;
});
this.dataSource = new SectionListDataSource(this.list);
}
}