This commit is contained in:
Amritanshu
2019-06-19 23:55:42 +05:30
parent 63f5f60842
commit 2b2624c9c2
33 changed files with 331 additions and 94 deletions

View File

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