# Relation
# Example (dynamic) Recommended
In the following example you can see an implementation based on the useEntityObject
data.
It will automatically use the icon
from the entities.json
.
<template>
<Relation :icon="usersIcon" fas />
<Relation :icon="projectsIcon" fas />
</template>
<script>
import { defineRelation } from '@jdi/backoffice-library'
export default {
setup(_, context) {
const [usersIcon] = defineRelation(context, 'users')
const [projectsIcon] = defineRelation(context, 'projects')
return {
usersIcon,
projectsIcon
}
}
}
</script>
# Example (manually, not recommended)
<template>
<Relation> <i class="fas fa-user-card"></i> {{ $t('customers.relation.users') }} </Relation>
</template>
# Example (static, not recommended)
<template>
<Relation icon="fa-user-card" fas />
</template>