These are chat archives for angular/material

Oct 2017
Sanka Wijesinghe
Oct 11 2017 08:58
im working with cdk md-table, but filling it by back-end spring service gives an error. im filling the table in connect () method as follows. pls help me to find the error.

(` connect(): Observable<Client[]> {
console.log("------------ ExampleDataSource connect --------------");

.map(params => params['status'] || '-1')
.subscribe(status => {
console.log("ExampleDataSource connect 1");
if (!this.clientService.clients) {
} else {
this.clients = this.clientService.clients;
console.log("ExampleDataSource connect 2");
this.clientDatabase = new ClientDatabase(this.clients);

const displayDataChanges = [
console.log("data from backend > : "+JSON.stringify(this.clientDatabase));

return Observable.merge(...displayDataChanges).map(() => {
return Client) => {
let searchStr = (item.fname + item.lname).toLowerCase();
return searchStr.indexOf(this.filter.toLowerCase()) != -1;
} `)

Max Grundell
Oct 11 2017 08:59
@sanka76811 - Tip is to write code within code brackets… ( ``` )
connect(): Observable<Client[]>{
Looks a lot better
Oct 11 2017 09:05
Screen Shot 2017-10-11 at 5.04.11 PM.png
anyone how to group this by name?
i think i did it wrong?
my loan date and maturity date was not align to the last entry
because the two last entry have a blank loan and matuity date
Sanka Wijesinghe
Oct 11 2017 09:10
@Grundell I did as (<my code>) but not work
Oct 11 2017 11:39
Who uses the CDK Table?
Is there a ready-made example of adding, editing, deleting records?
Sanka Wijesinghe
Oct 11 2017 15:32
@itprodavets so what is ur recommendation. there is no enough help. only sample I have is
no any sample about getting data from a db and update table.
Oct 11 2017 22:50

getting the following error on compiling with universal, i cant debug where exact the document. is being used, the ones i found i covered them with if

ReferenceError: document is not defined
    at DefaultDomRenderer2.__dirname../node_modules/@angular/platform-browser/@angular/platform-browser.es5.js.DefaultDomRenderer2.selectRootElement (/Projects/SL/dist/server.js:100727:72)
    at BaseAnimationRenderer.__dirname../node_modules/@angular/platform-browser/@angular/platform-browser/animations.es5.js.BaseAnimationRenderer.selectRootElement (/Projects/SL/dist/server.js:102803:106)
    at createElement (/Projects/SL/dist/server.js:57621:23)
    at createViewNodes (/Projects/SL/dist/server.js:60606:44)
    at createRootView (/Projects/SL/dist/server.js:60535:5)
    at Object.createProdRootView [as createRootView] (/Projects/SL/dist/server.js:61223:12)
    at ComponentFactory_.__dirname../node_modules/@angular/core/@angular/core.es5.js.ComponentFactory_.create (/Projects/SL/dist/server.js:58307:46)
    at ComponentFactoryBoundToModule.__dirname../node_modules/@angular/core/@angular/core.es5.js.ComponentFactoryBoundToModule.create (/Projects/SL/dist/server.js:51768:29)
    at ApplicationRef_.__dirname../node_modules/@angular/core/@angular/core.es5.js.ApplicationRef_.bootstrap (/Projects/SL/dist/server.js:53203:57)
    at /Projects/SL/dist/server.js:52981:81

can anyone help?