Initial Commit

This commit is contained in:
2021-01-05 13:02:52 +05:30
commit ec992df1da
520 changed files with 38712 additions and 0 deletions

View File

@ -0,0 +1,28 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Role } from '../role';
import { RoleListDataSource } from './role-list-datasource';
@Component({
selector: 'app-role-list',
templateUrl: './role-list.component.html',
styleUrls: ['./role-list.component.css'],
})
export class RoleListComponent implements OnInit {
list: Role[] = [];
dataSource: RoleListDataSource = new RoleListDataSource(this.list);
/** 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((value) => {
const data = value as { list: Role[] };
this.list = data.list;
});
this.dataSource = new RoleListDataSource(this.list);
}
}