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 9250195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:23:28+00:00 2026-06-18T10:23:28+00:00

I want to set a property of ApplicationController from within App.ready. But I don’t

  • 0

I want to set a property of ApplicationController from within App.ready. But I don’t see how this can be done from within this function

App.ready = function() {
    this.controller.set("isLoaded", true) ;
}

Is something like this possible ?

CHeers

  • 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-18T10:23:29+00:00Added an answer on June 18, 2026 at 10:23 am

    It’s not really possible to set controller values directly if the objects aren’t directly linked (Router > Controller > View), but I would also question why you wish to set something in the ApplicationController from the ready event. There are two options that you can take. Either you can create a new Ember object and set a value from the ready event there, and have the controller observe that property (example here. The second option is to respond to the ‘didInsertElement’ event on the ApplicationView (an example is here)

    Option 1:

    App = Em.Application.create({
        ready: function () {
            App.SomeObject.set('someValue', 'A value');
            alert('ready event fired');
        }
    });
    
    App.SomeObject = Em.Object.create({
        someValue: '1'
    });
    
    App.ApplicationController = Em.Controller.extend({
        someFunction: function () {
            // do something here (note that the original value of 1 for someValue is never set as the application
            // overwrites it immediately
        }.observes('App.SomeObject.someValue')
    });
    
    App.ApplicationView = Em.View.extend({    
        didInsertElement : function () {
            alert('view has been inserted into the dom');
            alert(App.SomeObject.get('someValue'));
        }
    });
    

    Option 2:

    window.App = Em.Application.create({
        ready: function () {
            alert('app is ready');
        }
    });
    
    App.ApplicationController = Em.Controller.extend();
    
    App.ApplicationView = Em.View.extend({    
        didInsertElement : function () {
            alert('view has been inserted into the dom');
        }
    });
    

    EDIT: Note that I’m pretty sure option 1 is messy and will be frowned upon by the Ember devs (although I can’t say for certain).

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

Sidebar

Related Questions

I want to set property via .InvokeMember but I can not do this when
I want to set a property value within my class. I can do it
From other Form i want to set visibility for textBoxes on this form but
I would like to programmatically set maxLength property of TextView as I don't want
I have the following property public MyType MyProperty {get;set;} I want to change this
I have a UIButton array. UIButton *btn[12]; I want to set property for this
I want to set a default value of my Attached Property, but when I
I want to set a property of an object that is an array type.
I want to set the maxChars property of the TextInput of an editable ComboBox.
I want to set the tabIndex property for a row of textbox(s) that are

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.