ember.js - EmberData manage model in controller without route -
Part of my applications is separated from my main template in a separate handler template {{render " To display some data from the model to render the header "}}
in the correct place, it is also your controller of the different template ( App.Notification
). What I want to do, it displays a limited amount of notifications
and the total number of new notifications. Amber loads 10 entries from the data server when the notification
property of the controller is called in each loop, but as soon as I see the amount of information shown through splice
I try to limit, no data will return.
Actually, I'm having trouble handling model data if I can not set the controller model in some way, then I think this is the reason that piece
Not working in this case I have already searched Stackoverflow and Ember Docs but found an example with only the common root -> controller setup, but there is nothing on this particular topic, so the question is that in this setup Model data correctly How to handle it?
Header Controller:
App.HyderController = Amber.Controller.endend NotificationName: (-> (@ 'Notification'). Filter ('Saw', False) .tate ('length')). Property ('Notification') Notifications: (- & gt; @ store.find ('Notification'). Piece (0, 2)). Property ('@ each notification')
Template:
{{# every notification}} ... {{/ every}}
Comments
Post a Comment