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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:31:34+00:00 2026-06-12T09:31:34+00:00

I am using AngularJS and trying to use ng-repeat or the like to take

  • 0

I am using AngularJS and trying to use ng-repeat or the like to take a multi-dimensional array and put it into the DOM as a mutli-level list.

From This:

    var menuOptions = [
        ["Page One"],
        ["Page Two"],
        ["Page Three"],
        ["Page Four", ["Sub-Page 1", "Sub-Page 2", "Sub-Page 3"] ],
        ["Page Five"]
    ];

To This:

   <ul>
        <li>Page One</li>
        <li>Page Two</li>
        <li>Page Three</li>
        <li>Page Four 
            <ul>
                <li>Sub-Page 1</li>
                <li>Sub-Page 2</li>
                <li>Sub-Page 3</li>
            </ul>
        </li>
        <li>Page Five</li>
   </ul>

I was unable to find anything in the Angular JS Documentation and a search of the web came to no avail. I am aware that I can handle something like this with plain ‘ol Javascript, or PHP but I would like to utilize some Angular JS thing like ng-repeat.

Any input is appreciated.

Thanks!

  • 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-12T09:31:35+00:00Added an answer on June 12, 2026 at 9:31 am

    If you turn your array into the following

    var menuOptions = [
        ["Page One", []],
        ["Page Two", []],
        ["Page Three", []],
        ["Page Four", ["Sub-Page 1", "Sub-Page 2", "Sub-Page 3"] ],
        ["Page Five", []]
    ];
    

    You should be able to do this:

    <ul>
      <li ng-repeat='option in menuOptions'>
        {{option[Ø]}}
        <ul>
          <li ng-repeat='suboption in option[1]'>{{suboption}}</li>
        </ul>
      <li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to use socketstream's RPC over websockets abstraction while using Angular for MVC.
I've recently been using Angularjs in my project. I'm trying to create a dynamic
Using AngularJS if I set a simple input text box value to something like
I'm trying to minify my AngularJS JavaScript (using SquishIt). My module has an injected
I am new to AngularJS and trying to learn the ropes. I'm using the
I'm trying to use a jQuery plugin ( Plupload ) with AngularJS. I have
Code in html.haml in Rails using AngularJS %table %tbody{:ng-init => my_model=#{@current_user_things.to_json}} %tr{:ng-repeat => row
I'm trying to create a simple messaging service (see jsFiddle) using AngularJS and it's
I am using AngularJS 1.0, PHP, and mysql with localhost on my Mac. I
Using the AngularJS framework, how do I have the Submit button both update the

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.