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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:48:03+00:00 2026-06-17T19:48:03+00:00

We are using version pre4 of ember. We have a framework (SignalR) working parallel

  • 0

We are using version pre4 of ember.

We have a framework (SignalR) working parallel with ember that handles real-time notifications to our application. In the older versions of ember we were able to access the global reference of the router / controller. But with the new version of Ember this is no longer possible. (This is fine)
We have tried different approaches like setting up a global controller in the top route:

setupController: function(){
    app.appController = this.controllerFor('app');
}

and sending an event to this controller, which bubbles up to the route like this:

notificator.update = function (context) { 
    app.appController.send('notificationOccured', context);
});

But this feels like working against the Ember team which just removed the global references.

So now to the big question: is there a better way to access the router or a controller from outside Ember? Preferably send an event to either with a context.

All help is appreciated!

  • 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-17T19:48:04+00:00Added an answer on June 17, 2026 at 7:48 pm

    So now to the big question: is there a better way to access the router or a controller from outside Ember? Preferably send an event to either with a context.

    Yes. This sounds like a good fit for the ember instrumentation module. Have an appropriate controller subscribe to SignalR events, then trigger them whenever your app handles real-time notification.

    First, add a method to ApplicationController for processing updates. If not defined here the event would bubble to the router.

    App.ApplicationController = Ember.Controller.extend({
      count: 0,
      name: 'default',
      signalrNotificationOccured: function(context) {
        this.incrementProperty('count');
        this.set('name', context.name);
      }
    });
    

    Next, setup your ApplicationController by subscribing to the signalr.notificationOccured event. Use the before callback to log the event and send it’s payload to the controller.

    App.ApplicationRoute = Ember.Route.extend({
      setupController: function (controller, model) {
        Ember.Instrumentation.subscribe("signalr.notificationOccured", {
          before: function(name, timestamp, payload) {
            console.log('Recieved ', name, ' at ' + timestamp + ' with payload: ', payload);
            controller.send('signalrNotificationOccured', payload);
          },
          after: function() {}
        });
      }
    });
    

    Then from your SignalR Application, use Ember.Instrumentation.instrument to send payload to your ApplicationController as follows:

    notificator.update = function (context) { 
      Ember.Instrumentation.instrument("signalr.notificationOccured", context);
    });
    

    I posted a working copy with simulated SignalR notifications here: http://jsbin.com/iyexuf/1/edit

    Docs on the instrumentation module can be found here, also check out the specs for more examples.

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

Sidebar

Related Questions

I have an asp.net site that is using version 1.1 of the .NET framework.
I have a Zend Framework project using version 1.10.8 with Doctrine 1.2.4.I use Zend_Auth
I have an Codeigniter app (using version 2.1.0) that is writing a transaction to
I'm using version 4.1.3 I have a table migrated from access that has a
I have set up a NInject (using version 1.5) binding like this: Bind<ISessionFactory>().ToMethod<ISessionFactory>(ctx =>
First off, I'm using version 3.7.1 with a jQuery UI framework theme. I'm trying
I'm new to ASP.NET MVC and am using version 1.0 of the framework. I
I am using version 3.8 without a key. I have used this exact code
I was using version 3.4.2 with CKEditor 3.6.3 and everything was working fine, but
If I coded my .net application using version 4.5 and the client machine that

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.