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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:10:51+00:00 2026-06-02T08:10:51+00:00

i have 3 tabs navigation and the content of each tab is different obviously.

  • 0

i have 3 tabs navigation and the content of each tab is different obviously.
i’m thinking about using StateManager in Emberjs to manager my tab views.

http://docs.emberjs.com/#doc=Ember.StateManager&src=false

is that a good idea? or is there a better router out there? i’ve looked at

  1. sproutcore-routing
  2. ember-routemanager

are those better than the statemanager? what’s the reason not to use statemanager?

  • 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-02T08:10:53+00:00Added an answer on June 2, 2026 at 8:10 am

    You can use something along this lines, see http://jsfiddle.net/pangratz666/e3wM7/:

    Handlebars:

    <script type="text/x-handlebars" >
        <ul>
            <li {{action "showFirst" target="App.stateManager"}} >First tab</li>
            <li {{action "showSecond" target="App.stateManager"}} >Second tab</li>
        </ul>
        <div class="tab-content" ></div>
    </script>
    
    <script type="text/x-handlebars" data-template-name="first" >
        first
    </script>
    <script type="text/x-handlebars" data-template-name="second" >
        second
    </script>​
    

    JavaScript:

    App.stateManager = Ember.StateManager.create({
        rootElement: '.tab-content',
        initialState: 'firstTab',
    
        showFirst: function(manager) {
            manager.goToState('firstTab');
        },
        showSecond: function(manager) {
            manager.goToState('secondTab');
        },
    
        firstTab: Ember.ViewState.create({
            view: Ember.View.extend({ templateName: 'first' })
        }),
        secondTab: Ember.ViewState.create({
            view: Ember.View.extend({ templateName: 'second' })
        })
    });​
    

    Also take a look at the blog post Anatomy of an Ember.js App Part I Redux: Routing and Outlets.

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

Sidebar

Related Questions

I have a tabs as views in my activity. Each tab represents a ListView
I have a UITabBarController with three tabs: each is a navigation controller with a
I am using jqgrid. My page has three tabs and each tab contains a
I am using jquery tabs to load content from a remote file. I have
I am using TW Bootstrap's tabs to tab through content on my clients' site
I have tabbar - two tabs with navigation controller in each. On second card
I have created some rounded navigation tabs using CSS and am having trouble when
I am using ActionBarSherlock and have an ActionBar with navigation tabs in it. I
I have a navigation bar which is an unordered list with tabs as list
I have created tabs by using jQuery API and have bound one event handler

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.