CompanyCard extras

These are considered experimental features.

You can feed data to your cards without poking around in the DOM. In your HTML, you must declare your cards with a data-ts.id attribute assigned.

<div data-ts="CompanyCard" data-ts.id="fb3f9811-3b0d-47c8-9926-bd1a01c9630c"></div>
<div data-ts="CompanyCard" data-ts.id="0eb79199-63a9-4f5f-a95e-79dbdaf25ae8"></div>
<div data-ts="CompanyCard" data-ts.id="53566229-7ec0-40b9-bce4-12d61bcbfe41"></div>
<div data-ts="CompanyCard" data-ts.id="6bf17754-f9de-4e31-aa31-bd3ff765b9c2"></div>

You can now (or even before) import the JSON from a demo file and instruct the cards to render.

$.getJSON('assets/cards.json', function(json) {
	ts.ui.CompanyCard.render(json);
});

The details view

The card should eventually be able to render its own details view so that it looks the same outside of V4. There's a lot of infrastructure that needs to happen first, not least with translations in the Runtime, but it could look like this.

ts.ui.get('#mycard').open();