-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
No one seems to know the answer here. What is the best practice for loading a global app state?
Currently using ember-rails style setup except with latest github ember and ember-data.
Example, In my main application view I have a headline that shows the current Company name, (or current user name for that matter). How do I populate this information in the view globally?
Example I have an application view:
<h1>{{companyName}}</h1>
<div>
{{outlet}}
</div>Controller:
App.ApplicationController = Ember.Controller.extend
companyName: "Loading..."
loadCompanyName: ()->
$.ajax
url: '/company'
dataType: 'json'
success: (response) ->
this.set 'companyName', response.data.companyNameWhere and how would i fire loadCompanyName? It isn't specific to a route. It is global
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels