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

  • SEARCH
  • Home
  • 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 8288529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:18:02+00:00 2026-06-08T12:18:02+00:00

I have two ember objects available in a function, but I cant seem to

  • 0

I have two ember objects available in a function, but I cant seem to figure out how to create a binding between them, since I cant reference them via a static path. The objects are referenced to as var aand var bin the javascript function.

How to create a binding between two objects when I can’t reference one of them like App.controller.content or similar?

Or alternatively; can I reference to a specific ember object in a ArrayControllers content via some static path? I have tried many variations of the getPath method on both objects but cant seem to get it to return something useful.

  • 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-08T12:18:04+00:00Added an answer on June 8, 2026 at 12:18 pm

    All paths have to be relative to “this” (whatever the object is, or what was in the apply) or as you stated, a global path. But there is nothing stopping you from setting relative paths once you are in the function you mentioned.

    a.set('b': b);
    
    a.set('someMethod', function(){
        return this.getPath('b.methodName');
    }.property('b.methodName'));
    

    Once they have reference to each other, you can add relative paths to your hearts content. I would prefer to do this over creating a method with relative scope, so you don’t miss any updating values.

    I created a simple jsfiddle to show you what I mean. I would normally have created a View etc, but was trying to keep it to only a few lines.

    Now that being said, I feel like you should be able to bind directly between objects by setting a _to or _from on a Binding. But looking through that code, it seems like everything is relative & path based. Maybe the transformation stuff will change in the 1.0 release of the framework.

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

Sidebar

Related Questions

I try to have some inheritance with attributeBindings between two View. (function(exports) { Ember.MobileBaseView
I have googled around but the only resource for teaching me how to create
I have two flash movies, both seem to have the same embed/object params and
I have two slideshows in one page using javascript http://www.flickrshow.com/static/scripts/flickrshow-7.2.min.js , but it only
I've run into this problem before and couldn't figure it out, but it's basically
I have two TableViewControllers with a segue in-between. When a user clicks on a
Have two folders with approx. 150 java property files. In a shell script, how
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two tables images2 and image_data So the goal is to have 1
I have two classes (MVC view model) which inherits from one abstract base class.

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.