![Logo](/_astro/logo.DNC1PCTe_Z1abT04.webp)
Enter a search term above to see results...
Enter a search term above to see results...
Lets now look at how dateSettings
retrieves the current timezone.
Your component’s data context can retrieve values from many different places in Semantic.
In this example you can see we are now adding a new value to our expression in component.html
{formatDate time 'h:mm:ss a' { timezone: timezone }}
Expressions can either be written using spaced arguments, as any valid javascript, or as a mixture of both.
{ formatDate(time, 'h:mm:ss a', { timezone: timezone}) }
Semantic components generally prefer spaced arguments for legibility, and to ensure template logic is defined outside of your template file.
Whats in a Context - Your data context can pull values from many different places, internal state, external setting, properties or methods on your component, other components, or by passing in data directly through subtemplating.