Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groupBy : 'datetime' #218

Open
henriquealho opened this issue Aug 30, 2016 · 0 comments
Open

groupBy : 'datetime' #218

henriquealho opened this issue Aug 30, 2016 · 0 comments

Comments

@henriquealho
Copy link

Hi, I'm trying to groupBy a datetime but what happens is that all my datetime's are different and I get different groups by each minute.

How can I change the datetime when doing the ng-repeat ?

My code:


<ul class="timeline" ng-repeat="(key, value) in notifications | groupBy: 'datetime'">

    <!-- timeline time label -->
    <li class="time-label">
      <span class="bg-blue">
        {{key | date: 'MMM d, y'}}
      </span>
    </li>
    <!-- /.timeline-label -->

    <!-- timeline item -->
    <li ng-repeat="notification in value">
      <!-- timeline icon -->
      <i class="ng-class: notification.cssClass ;"></i>
      <div class="timeline-item">
        <span class="time"><i class="fa fa-clock-o"></i> {{notification.datetime | date : 'HH:mm'}}</span>

        <h3 class="timeline-header">
          <a ng-href="{{notification.url}}">{{notification.title}}</a>
        </h3>

        <div class="timeline-body">
          <p ng-bind-html="notification.message"></p>
        </div>
      </div>
    </li>
    <!-- END timeline item -->

  </ul>

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant