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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:58:25+00:00 2026-06-04T18:58:25+00:00

I have implemented to following in ember.js. The code works up to a certain

  • 0

I have implemented to following in ember.js. The code works up to a certain point.

The URL does not change when I enter the application at root url i.e. ‘/’ where it should go to tasks.index and reflect the changes in the url by showing #/tasks.

But it behaves correctly when I go to ‘#/tasks’ and shows the message ‘hello from index view’.

I am using Google Chrome version 19 and ember.js edge.

Any help is very much appreciated.

App = Em.Application.create({});

App.IndexView = Em.View.extend({
    template: Em.Handlebars.compile(
        'hello world from index'
    )
});

App.ShowView = Em.View.extend({
    template: Em.Handlebars.compile(
        'hello world from show'
    )
});

App.Router = Ember.Router.extend({
    location: 'hash',
    rootElement: "#my-app",
    enableLogging: true,

    root: Ember.State.extend({
        index: Ember.State.extend({
            route: '/',
            redirectsTo: 'tasks.index'
        }),

        tasks: Ember.State.extend({
            route: '/tasks',

            index: Ember.ViewState.extend({
                route: '/',
                view: App.IndexView
            }),

            show: Ember.ViewState.extend({
                route: '/show',
                view: App.ShowView
            })
        })
    })
});

App.initialize();
  • 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-04T18:58:27+00:00Added an answer on June 4, 2026 at 6:58 pm

    See this jsFiddle:

    Code->http://jsfiddle.net/ud3323/WLcRQ/

    Debug-> http://jsfiddle.net/ud3323/WLcRQ/show/

    All you needed to do was change redirectsTo: 'tasks.index' to redirectsTo: 'tasks'.

    You don’t need to specify the destination state’s starting route when using redirectsTo when the destination state has a starting route defined (as you’ve done).

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

Sidebar

Related Questions

I have implemented following code in my application. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
I have implemented the following code but my SearchActivity::OnCreate is not getting called. Can
I have the following problem: I implemented a managed mobile application for Windows Mobile
I have the following problem. I have a tabbed application implemented using a ViewPager.
I have implemented contextual menus in QTreeView items with the following code MyDerivedQTreeView->setModel(MyDerivedQAbstractItemModel); MyDerivedQTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
I have implemented following in my application. for(i=0;!stopThroughButtons && i<totalMovements;i++){ [NSThread detachNewThreadSelector:@selector(moveNeedle) toTarget:self withObject:nil];
I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/ $(document).ready(function() { $('ul.navone li
In order to understand the Monitor I have implemented the following code.But I am
i have implemented following method in my application. - (void)accelerometer:(UIAccelerometer *)acel didAccelerate:(UIAcceleration *)aceler {
I have a WPF application. I have implemented the following function, but no one

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.