oraclejet-demo-card
v0.4.0
Published
sample composite component for OracleJET
Downloads
46
Readme
oraclejet-demo-card
sample of a composite component to test delivery via nmp
Installation and use
npm install oraclejet-demo-card
Add the following to the HTML view that you want to load the card into.
<div id="card-holder">
<oj-bind-for-each data="[[employees]]">
<template>
<oraclejet-demo-card
name="[[$current.data.name]]"
avatar="[[$current.data.avatar]]"
work-title="[[$current.data.title]]"
work-number="[[$current.data.work]]"
email="[[$current.data.email]]"
>
</oraclejet-demo-card>
</template>
</oj-bind-for-each>
</div>
In your viewmodel provide an array named "employees" that contains the following fields.
[{
name: 'Fred Flintstone',
avatar: 'css/images/avatar_24px_2x.png', <== optional
title: 'Purchasing Director',
work: 5171278899,
email: '[email protected]',
backgroundImage: 'images/background.png' <== optional
}]
In the viewmodel add a reference to the "loader.js" module from the oraclejet-demo-card installation folder
'oraclejet-demo-card/loader'