Hi, I need your help for something really easy i think. But i can’t get it work. I have a component with one attribute and one content.
{{#materialize-navbar-scrollspy-item anchor=category.name}}{{category.name}}{{/materialize-navbar-scrollspy-item}}
As you can see, content and anchor attribute come from the same variable but i want to sanitize the attribute’s value.
I tried this :
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
__init : function() {
var anchor = this.get('anchor');
this.set('anchor', '#' + anchor.replace(" ","-"))
}.on('didInsertElement')
});
With this code the value of content is also modify. I tried to call:
this.get('anchor').copy()
but with this value, anchor is not set .
Any Idea?