I'm sure this is another newbie coder question but I have an ng-repeat and
want to get the count of the items in the within each child.

The following returns a count for the number of channels. But I want to get
the count of records WITHIN a channel:

<table>

<thead>

                 <tr>
                     <th style="width: 25%;">Channel Name</th>
                     <th style="width: 45%">Number of Records In Channel</th>

      </tr>

              </thead>


<tbody>

                 <tr data-ng-repeat="channel in channels">
                     <td>
                     {{ channel.channelName }}
                     </td>
                     <td>
                       *{{dataForChannel.length}}*
                     </td>
                 </tbody>
             </table>

dataForChannel.length correctly gives me the number of channels. But how do
you get the number of children in an individual channel?

--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/245e2c74-7156-49fb-a68a-4d0e8447b2b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Kato Richardson at Jan 14, 2015 at 3:12 am
    Doug,

    There are quite a few critical components missing here (like what
    dataForChannel and channels are and how they were created).

    Channels.length should work if it was created using $asArray();

    Cheers,
    Kato



    On Tue, Jan 13, 2015 at 9:31 AM, Doug Thompson wrote:

    I'm sure this is another newbie coder question but I have an ng-repeat and
    want to get the count of the items in the within each child.

    The following returns a count for the number of channels. But I want to
    get the count of records WITHIN a channel:

    <table>

    <thead>

    <tr>
    <th style="width: 25%;">Channel Name</th>
    <th style="width: 45%">Number of Records In
    Channel</th>

    </tr>

    </thead>


    <tbody>

    <tr data-ng-repeat="channel in channels">
    <td>
    {{ channel.channelName }}
    </td>
    <td>
    *{{dataForChannel.length}}*
    </td>
    </tbody>
    </table>

    dataForChannel.length correctly gives me the number of channels. But how
    do you get the number of children in an individual channel?

    --
    You received this message because you are subscribed to the Google Groups
    "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/firebase-angular/245e2c74-7156-49fb-a68a-4d0e8447b2b0%40googlegroups.com
    <https://groups.google.com/d/msgid/firebase-angular/245e2c74-7156-49fb-a68a-4d0e8447b2b0%40googlegroups.com?utm_medium=email&utm_source=footer>
    .
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CADypTEa9w5EePUmHXey10sY-qmQVBqP%2BzOS3i5amxKCmwXR-LQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupfirebase-angular @
postedJan 14, '15 at 1:15a
activeJan 14, '15 at 3:12a
posts2
users2

2 users in discussion

Doug Thompson: 1 post Kato Richardson: 1 post

People

Translate

site design / logo © 2021 Grokbase