Posts

Showing posts with the label table

populate json content in table using angular6

Image
Clash Royale CLAN TAG #URR8PPP populate json content in table using angular6 I have json to construct table by populating its header and body dynamically. But my following table angular6 code is not populating as expected. Could anyone suggest the problem is in json or table iteration. Expected Output: JSON: this.columns = ["role1", "role2", "role3"]; this.permission = [ { role1: [{ master: { sub1: { read: true, write: true }, sub2: { read: true, write: true } }, support: { sub3: { read: true, write: false } }, admin: { sub4: { read: false, write: false } } }], role2: [{ master: { sub1: { read: true, write: false }, sub2: { read: true, write: false } }, support: { sub3: { read: true, write: true } }, admin: { sub4: { read: false, write: false } } }], role3: [{ master: { sub1: { read: true, write: true }, sub2: { read...

How to define a cellsize in LaTeX for wraptable?

Image
Clash Royale CLAN TAG #URR8PPP How to define a cellsize in LaTeX for wraptable? I have created the following table in LaTex with wrap table from Package wrapfigure. documentclass[a4paper,11pt,oneside,numbers=noendperiod,setspace,parskip=half]{scrbook} usepackage[ngerman, english]{babel} usepackage{blindtext} usepackage[utf8]{inputenc} usepackage[T1]{fontenc} usepackage{lmodern} usepackage{wrapfig} usepackage[table,xcdraw]{xcolor} begin{document} blindtext begin{wraptable}{l}{8cm} begin{tabular}{lcccc} hline rowcolor[HTML]{656565} multicolumn{1}{|c|}{cellcolor[HTML]{656565}{color[HTML]{FFFFFF} textbf{Surface geometry}}} & multicolumn{4}{c|}{cellcolor[HTML]{656565}{color[HTML]{FFFFFF} textbf{Terrain Classes}}} \ hline multicolumn{1}{|l|}{textit{begin{tabular}[c]{@{}l@{}}fine texture,\ high convexityend{tabular}}} & multicolumn{1}{c|}{cellcolor[HTML]{643403}textbf{1}} & multicolumn{1}{c|}{cellcolor[HTML]{F8A102}textbf{5}} & multicolumn{1}{c|}{cellcolor[HTML]{009901}tex...

ng-repeat vertically and horizontally in a table when receiving dynamic data

Image
Clash Royale CLAN TAG #URR8PPP ng-repeat vertically and horizontally in a table when receiving dynamic data I am trying to display data in a table. Rows and columns are dynamic. I want to use ng-repeat . ng-repeat I am receiving data in this form: headers: [ 0: {"heading1"}, 1: {"heading2"}, 2: {"heading3"} ] data: [ 0:{ id:1, code:"Barry" , description:"Allen" } 1:{ id:2, code:"Naruto" , description:"Uzumaki" } 2:{ id:3, code:"Hannah" , description:"Montana" } ] I tried this way : <thead> <tr> <td ng-repeat="c in headersData">{{c}}</td> </tr> </thead> <tbody> <tr ng-repeat="c in columnData"> <td>{{c.id}}</td> <td>{{c.code}}</td> <td>{{c.description}}</td> </tr> </tbody> But it's not rendering the thead . Any solution? thead ...