Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8571319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:45:19+00:00 2026-06-11T18:45:19+00:00

Using Ember.CollectionView I want to access and manipulate the DOM element which is being

  • 0

Using Ember.CollectionView I want to access and manipulate the DOM element which is being inserted by each child view. The issue I have is that I don’t know how to get a reference to the element from within didInsertElement. Here is the jsFiddle — the summery of coffeescript is below:

window.App = Ember.Application.create()
window.App.initialize()

App.Item = Em.View.extend
  didInsertElement: () ->
    console.log ">>> element is: ", this.element

App.items = Em.ArrayController.create()

App.items.set('content',[
    Em.Object.create({title:"AN", id:"item-one"}),
    Em.Object.create({title:"Epic", id:"item-two"}),
    Em.Object.create({title:"View", id:"item-three"})
])

App.EpicView = Ember.CollectionView.extend
  classNames: ['epic-view']
  contentBinding: 'App.items'
  itemViewClass: 'App.Item'

this.element is undefined. I have also tried calling element and that is undefined as well. According to the docs, there is an element property available inside the view, but I don’t know how to access it, and I am not sure if it is available from within didInsertElement or not.

How can I get the id of the DOM element that was just inserted into the view? Ideally, I would like not having to search for it in the DOM since the view should already be aware of what it is inserting into the DOM.

ps: I am using Ember 1.0pre

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:45:20+00:00Added an answer on June 11, 2026 at 6:45 pm

    Use get(‘element’) or get(‘elementId’) to access properties in Ember

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Ember js, I've got a tree-based structure of views, each of which has
I have a Ember.Select View, using which I can bind an Array of contents
I'm using Ember 0.9.8.1 and having an issue with nested views not retaining the
I want to test an ember controller is correctly adding a view to to
I would like to render an ember.js view using either raphael.js or d3.js .
I'm using Ember.js and I'm trying to have a div element with two different
Possible Duplicate: Using Ember.js, how do I run some js after a view is
I'm using an Ember.CollectionView with an itemView that contains {{bindAttr class=App.offersController.filters.profile:selected}} . When App.offersController.filters
I'm writing a simple sort / pagination controller using ember pre 1.0. I want
I'm using Ember built from git master. My RouteManager is not complex, but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.