list-view & add class to data-grid thead
This commit is contained in:
@@ -1 +1,11 @@
|
||||
<p>list-view-demo-home works!</p>
|
||||
<h1>list view demo</h1>
|
||||
|
||||
<ps-list-view [dataSource]="merchantDataSource" >
|
||||
<div *psListViewHeader>Some Header ..</div>
|
||||
<div *psListViewItem="let item">
|
||||
<div>Name: {{item.name}} </div>
|
||||
<div>Address: {{item.address}} </div>
|
||||
</div>
|
||||
<div *psListViewFooter>Some Footer ..</div>
|
||||
</ps-list-view>
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ListViewDemoHomeComponent } from './list-view-demo-home.component';
|
||||
|
||||
describe('ListViewDemoHomeComponent', () => {
|
||||
let component: ListViewDemoHomeComponent;
|
||||
let fixture: ComponentFixture<ListViewDemoHomeComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ListViewDemoHomeComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ListViewDemoHomeComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,4 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { IMerchant } from 'src/app/data/services/IMerchant';
|
||||
import { IDataSource } from '@poweredsoft/data';
|
||||
import { MerchantService } from 'src/app/data/services/merchant.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'ps-list-view-demo-home',
|
||||
@@ -7,9 +11,17 @@ import { Component, OnInit } from '@angular/core';
|
||||
})
|
||||
export class ListViewDemoHomeComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
merchantDataSource: IDataSource<IMerchant>;
|
||||
|
||||
|
||||
constructor(private merchantService: MerchantService) {
|
||||
this.merchantDataSource = merchantService.createDataSource(); //Assign the dataSource
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.merchantDataSource.refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,13 +3,16 @@ import { CommonModule } from '@angular/common';
|
||||
|
||||
import { ListViewDemoRoutingModule } from './list-view-demo-routing.module';
|
||||
import { ListViewDemoHomeComponent } from './list-view-demo-home/list-view-demo-home.component';
|
||||
import { ListViewModule } from '@poweredsoft/ngx-cdk-ui';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [ListViewDemoHomeComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ListViewDemoRoutingModule
|
||||
ListViewDemoRoutingModule,
|
||||
ListViewModule
|
||||
]
|
||||
})
|
||||
export class ListViewDemoModule { }
|
||||
|
||||
Reference in New Issue
Block a user