Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

Pass DOM element to Ember Component

$
0
0

@MrChriZ wrote:

I’m trying to pass a DOM element into an Ember add on component

I’m the Toolbar component from this add-on:

In the raw non ember material-design-components a global script is used to do this: toolbar.fixedAdjustElement = document.querySelector('.mdc-toolbar-fixed-adjust');

Following through the code in the ember component it looks like the contentElement argument should contain the .mdc-toolbar-fixed-adjust element.

I’ve tried to do this… but it’s not working:

{{#mdc-toolbar isWaterfall=true isFixed=true isLastRowFixed=true isFlexible=true contentElement=Ember.$('.mdc-toolbar-fixed-adjust')[0]}}

https://ember-twiddle.com/78bb807277b50460cc8eda1161417983?openFiles=templates.application.hbs%2C

Is it possible to pass a DOM element into a component in this way?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles