thelgevold / svelte-samples

MIT License
5 stars 1 forks source link

Refs #1

Open wildfiremedia opened 7 years ago

wildfiremedia commented 7 years ago

In your blog mentioning "to add self references in the template", you mean this: https://svelte.technology/guide#refs

TodoMVC that use ref and JSON without hardcode should fit your treeview code. https://github.com/sveltejs/svelte-todomvc

thelgevold commented 7 years ago

In my post I am referring to self references using the tag element that represents the component. Basically allow the component template to call itself to create a recursive template.

Similar to this: http://www.syntaxsuccess.com/viewarticle/recursive-treeview-in-angular-2.0 The linked example is Angular 2, but is illustrates the concept.

thelgevold commented 7 years ago

There is an issue logged for this here: https://github.com/sveltejs/svelte/issues/51