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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:11:22+00:00 2026-06-17T20:11:22+00:00

In pre2, suppose I had this application code, outside the router: var controller =

  • 0

In pre2, suppose I had this application code, outside the router:

  var controller = App.MyController.create();
  controller.content = [...];

  App.get('router').get('applicationController').connectOutlet({
    outletName: 'modal',
    controller: controller,
    viewClass: App.MyView,
    context: controller
  });

That is, I fill an outlet named ‘modal’ added to the ‘application’ template, with my data.

Now, in pre4 I have no reference to the controllers created by the router. How would you fill an outlet from outside the router?

I could ask the router for a transition, but I don’t want to modify the URL, as I’m just opening a modal over the current content.

EDIT:

This is what I came up with for a temp fix, by looking up the application view from the App.Router.router object.. obviously it’s a dirty hack, anyone know the best & right way to do it in pre4?

  var controller = App.MyController.create();
  controller.content = this.get('content');

  var theView = App.MyView.create();
  theView.set('controller', controller);

  App.Router.router.currentHandlerInfos[0].handler.router._activeViews.application[0].connectOutlet('modal', theView);
  • 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-17T20:11:23+00:00Added an answer on June 17, 2026 at 8:11 pm

    If you just need to add your view into the app you can use my solution in this question:

    What's the right way to enter and exit modal states with Ember router v2?

    But if you need to add it too an outlet, you can do it by sending an event to the router and just render it in the event without transitioning it to another route.

    events: {
        showModal: function(){
            this.render('modal', {into: 'index', outlet: 'modalOutlet', controller = this.controllerFor('modal')}); 
        }
    }
    

    See fiddle for an example:

    http://jsfiddle.net/Energiz0r/gChWa/1

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

Sidebar

Related Questions

I'm currently migrating my application from ember 1.0.0-pre2 to 1.0.0-pre4 and I am having
I have been trying the new Router and the new Ember code (Version: v1.0.0-pre.2-366-g4772b18),
I've recently had some quite strange race condition in the applet code. Looks like
I'm planning a WPF application which will be able to create dynamic data entry
i just discovered http://code.google.com/p/re2 , a promising library that uses a long-neglected way (
I have an application running on thin 1.2.11 behind nginx. I was trying to
Right now I calculate it like this: double dx1 = a.RightHandle.x - a.UserPoint.x; double
I've got some of the following code: https://gist.github.com/c111cf9a240a078c9f6a (in rails) I'm using ember-latest: //
We are using one of the later versions of Ember (router V2), not the
I am trying to use an OrderedDict (Raymond Hettingers version for pre2.7 Python) where

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.