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}}  

Many issues in your post code are provided in the link but I will tell for clarity here: < Ol>

  • You can use the property length directly in the template
  • Use Ember.computed.filterBy to get a very efficient array overview
  • Configure your singleton instance The App Path">
  • I understand Barb, but I also do not
  • Hope it helps anyway.


    Comments

    Popular posts from this blog

    import - Python ImportError: No module named wmi -

    Editing Python Class in Shell and SQLAlchemy -

    c# - MySQL Parameterized Select Query joining tables issue -