Let's say that you have one web component stored inside of another in Dart. Is there any way to access state from other components?
Let's say that I have a Polymer element called x-notebook-element
and one called x-note-element
embedded inside of it (via an iterator):
<polymer-element name="x-notebook-element">
<template>
<ul>
<template repeat="{{note in notes}}">
<li is="x-note-element" note="{{note}}"></li>
</template>
</ul>
</template>
<script type="application/dart" src="notebook.dart"></script>
</polymer-element>
The difficulty is that I want to be able to click on a Delete
button within an x-note-element
that removes the x-note-element
from the DOM and removes the note
associated with it from the notes
list.