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

The Archive Base Latest Questions

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

To render a content of an array with emberjs we usually do the following

  • 0

To render a content of an array with emberjs we usually do the following

<ul>
  {{#each controller}}
    <li>{{name}} by {{artist}}</li>
  {{/each}}
</ul>

How to make a live stream view like we have with twitter (of facebook) where a new stream is added on the top of the streams list ?

  • 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-17T10:11:31+00:00Added an answer on June 17, 2026 at 10:11 am

    On the controller you can set the sortProperties see here to specify on which property the array should be sorted and you can set sortAscending (which is a boolean) to specify which direction the array should be sorted.

    When you change the array the view will automatically update.

    see this fiddle: http://jsfiddle.net/ZnMFK/2/

    or this fiddle: http://jsfiddle.net/KfzFE/ to show the DOM gets updated when the array is changed.

    HTML:

    <script type="text/x-handlebars" data-template-name="index">
      <div class="patient-view extended">
        {{#each controller}}
        <p>Name: {{name}}</p>
        {{/each}}    
      </div>
    </script>
    

    App:

    window.App = Em.Application.create();
    
    App.Patient = Em.Object.extend({
      order: undefined,
      name: undefined
    });
    
    App.IndexView = Em.View.extend({
      click: function() {
        this.get('controller')
            .set('sortAscending', !this.get('controller').get('sortAscending'));
      }
    });
    
    
    App.IndexController = Em.ArrayController.extend({
      sortProperties: ['order'],
      sortAscending: false
    });
    
    App.IndexRoute = Em.Route.extend({
      model: function() {
        return Em.A([App.Patient.create({
          name: "Bert",
          order: 2
        }), App.Patient.create({
          name: "Ernie",
          order: 1
        })]);        
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I gather I can render a specific element of the $page['content'] array like
I would like to render the following markup: <div class=row> <p> <label>Your Name</label> <input
I have a CATiledLayer into which I render content in the following method -
When I have to render textarea content to the front end I usually pass
I would like to render to an offscreen bitmap (or array of RGBA values)
Both ArrayController and CollectionView have same functionality to render 'content' array using template, except
I'd like to render content that is subject to presentation change. For example, if
I am developing an application using WPF to dynamically render content, including text and
I am using string template to render some content, but the content may be
I want the url http://welcome.com (for example) to render the content from the url

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.