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

  • SEARCH
  • Home
  • 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 8228247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:24:02+00:00 2026-06-07T16:24:02+00:00

How would I use AngularJS ng-repeat to display the following HTML (Twitter Bootstrap Scaffolding)?

  • 0

How would I use AngularJS ng-repeat to display the following HTML (Twitter Bootstrap Scaffolding)? Essentially, every third record I need to close the </div>, print an <hr>, then open another <div class="span4">

    <div class="row">
      <div class="span4">
        <h3>
          Project A
        </h3>
      </div>
      <div class="span4">
        <h3>
          Project B
        </h3>
      </div>
      <div class="span4">
        <h3>
          Project C
        </h3>
      </div>
    </div>

    <hr>

    <div class="row">
      <div class="span4">
        <h3>
          Project D
        </h3>
      </div>
      <div class="span4">
        <h3>
          Lab Title
        </h3>
      </div>
      <div class="span4">
        <h3>
          Project E
        </h3>
      </div>
    </div>

I’ve created a fiddle for code demos.
http://jsfiddle.net/ADukg/261/

  • 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-07T16:24:04+00:00Added an answer on June 7, 2026 at 4:24 pm

    A more elegant way is to use the view model to provide a chunked collection and then let the view handle it like

    <div ng-controller="Controller">
        Projects <input ng-model="projects"></input>
        <hr/>
        <div ng-repeat="row in rows">
            <div ng-repeat="project in row">
                Projects {{project}}
            </div>
            <hr/>
        </div>
    </div>​
    

    and the coffeescript is pretty simple

    # Break up an array into even sized chunks.
    chunk = (a,s)->
        if a.length == 0
            []
        else               
            ( a[i..i+s-1] for i in [0..a.length - 1 ] by s)
    
    @Controller = ($scope)->
        $scope.projects = "ABCDEF"
    
        $scope.$watch "projects", ->      
           $scope.rows = chunk $scope.projects.split(""), 3
    
    angular.bootstrap(document, []);
    

    ​

    http://jsfiddle.net/ADukg/370/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are the main reasons someone would use HTML's tbody in a table? Is
In a .jsp I would use: <fmt:message key=welcome.title/> to display a message from my
i would use a ModelBase with an ID and a Timestamp for every class/entity.
Why one would use one of the following packages instead of the other? Java
Can you advise me on what URI you would use to expose the following
normally on would use the following :- aspx page:- <a ID=a1 href=javascript:void(0);>Link1 </a> code
I would use a multi dimensional gaussian modell for regression. Rasmussen has a book
I would use Jmagick into an Android Project. Is it possible? I have to
I thought I would use a stored routine to clean up some of my
In .NET I would use System.Diagnostics.Trace... What would I use in C or C++

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.