Skip to content
Snippets Groups Projects
Commit 2bd48cea authored by Eugen Ciur's avatar Eugen Ciur
Browse files

Breadcrumb component with state

parent 2c46f16b
Branches
No related tags found
No related merge requests found
<ul> <ul>
{{#each this.breadcrumb.items as |item|}} {{#each this.path as |path_item|}}
<li> <li>
{{item.title}} {{path_item.title}}
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
\ No newline at end of file
...@@ -4,7 +4,7 @@ import { tracked } from '@glimmer/tracking'; ...@@ -4,7 +4,7 @@ import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object'; import { action } from '@ember/object';
export default class BreadcrumbComponent extends Component { export default class BreadcrumbComponent extends Component {
@tracked path = A([]); @tracked path = A([{'id': 1, 'title': 'Some Folder 1'}, {'id': 2, 'title': 'Some Folder 2'}]);
@action @action
change(node_id) { change(node_id) {
......
<Breadcrumb />
<div class="node folder"> <div class="node folder">
<div class="icon folder"></div> <div class="icon folder"></div>
<div class="title"> <div class="title">
......
<Breadcrumb />
<div class="nodes"> <div class="nodes">
<ul class="results"> <ul class="results">
{{#each @nodes as |node|}} {{#each @nodes as |node|}}
......
Folder <Breadcrumb />
<Nodes @nodes={{@model}} /> <Nodes @nodes={{@model}} />
index
<Breadcrumb /> <Breadcrumb />
<Nodes @nodes={{@model}} /> <Nodes @nodes={{@model}} />
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment