No Authz!
Object Handling
An array of objects is embedded in the script area of this page as:
export const embeddedArray = [
{ title: 'Object 1', descr: 'Description 1', },
{ title: 'Object 2', descr: 'Description 2', },
{ title: 'Object 3', descr: 'Description 3', },
]
It can be rendered using the v-for = "object in embeddedrray"
conditional
Title: Object 1, Description 1 Title: Object 2, Description 2 Title: Object 3, Description 3
$SAMPLE_DATA/sampleObjectArray.ts
: export const sampleObjectArray = [ { title: 'Object 1', description: 'Description 1', }, { title: 'Object 2', description: 'Description 2', }, ]
Route: Object 1
{ "title": "Object 1", "description": "Description 1" }
Route: Object 2
{ "title": "Object 2", "description": "Description 2" }
The 'complexObject'
and its sub-objects, and TypeScript Interfaces, are all defined in '$SAMPLE_DATA/sampleArrays.ts':
DataComplexDataObject
component renders each object as a simple card. Union types string | NamedTag
and conditional rendering, are usec to handle variation of data type in a single property. This is the first object.
This is the second object.