
ctrl+k
Enter a search term above to see results...
Enter a search term above to see results...
Your components are not just limited to internal state
. You can use settings
to let each instance have its own configuration.
Since we are using tagName
our components settings
can be configured by adjusting the html attributes or properties on the DOM element associated with the component.
We are adding city
and timezone
which can now be used to modify the time display.
You can see in index.html
<current-time city="Norfolk" timezone="EST"></current-time><current-time city="Los Angeles" timezone="PST"></current-time>
This adjusts the settings
in createComponent
to be a different setting.city
and setting.timezone
for each instance.