Closed mearleycf closed 9 years ago
I can't seem to get anything except a hard-coded value to show up for the breadcrumbs.
The artifacts.js controller: //controllers/artifacts.js import Ember from 'ember';
export default Ember.ArrayController.extend({ breadCrumb: 'name', sortProperties: ['title'], sortAscending: true, filter:'', filteredContent: function(){ var filter = this.get('filter'); var rx = new RegExp(filter.replace(/\W/g, ''), 'gi'); var rules = this.get('arrangedContent'); return rules.filter(function(rule) { return rx.test(rule.get('title')); }); }.property('arrangedContent', 'filter') });
The handlebars template: <div class="col-xs-12 flex isRow spaceBetween alignCenter"> <div class=""><h1>{{title}}</h1></div> <div class=""> {{#link-to 'artifacts'}} <button class="btn btn-default">Back to List</button> {{/link-to}} {{#link-to 'artifacts.edit' model}} <button class="btn btn-primary">Edit</button> {{/link-to}} </div> </div>
<div class="col-xs-12 flex isRow spaceBetween alignCenter">
<div class=""><h1>{{title}}</h1></div>
<div class="">
{{#link-to 'artifacts'}}
<button class="btn btn-default">Back to List</button>
{{/link-to}}
{{#link-to 'artifacts.edit' model}}
<button class="btn btn-primary">Edit</button>
</div>
Sorry about the confusion. You might want to check out a sample app I put up here: https://github.com/chrisfarber/ember-breadcrumbs-sample-app
It includes an example of a live-updating dynamic breadcrumb.
I can't seem to get anything except a hard-coded value to show up for the breadcrumbs.
The artifacts.js controller: //controllers/artifacts.js import Ember from 'ember';
The handlebars template:
<div class="col-xs-12 flex isRow spaceBetween alignCenter">
<div class=""><h1>{{title}}</h1></div>
<div class="">
{{#link-to 'artifacts'}}
<button class="btn btn-default">Back to List</button>
{{/link-to}}
{{#link-to 'artifacts.edit' model}}
<button class="btn btn-primary">Edit</button>
{{/link-to}}
</div>
</div>
- `
` name`
`
`
`
` How do I replace 'name' with the actual path it's supposed to render?!?