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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:54:07+00:00 2026-05-28T00:54:07+00:00

There are different ways to invoke routes. I currently use Router.navigate( ‘/url’, true )

  • 0

There are different ways to invoke routes. I currently use Router.navigate( ‘/url’, true ) in my view functions to trigger a route, but it also seems possible to trigger a route with an anchor tag with the url hash as the href attribute.

The way I render a collection to the screen has also something to do with it I guess. I have a global ‘index’ view that render a new subview for each item from the collection.

    render : function() {
        var self = this;

        $( this.el ).html( _.template( this.template, {} ) );

        this.collection.each( function( model ) {
            self.addOne( model );
        } );
    },

    addOne : function( model ) {
        var project = new TMRS.views.projects.Record( { model : model } );

        $( this.el ).append( project.render().el );
    },

Within the subview I trigger a route when a specific element is clicked, it works and it is easy as pie.
But when I would decide to use anchors with hashes there is nu use for the subview anymore, because I can just iterate over the collections within my templates and handle urls with anchor tags.

I think it is better to use a single view for each record, but I don’t know if it is the way to go. What do you guys think?

  • 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-05-28T00:54:08+00:00Added an answer on May 28, 2026 at 12:54 am

    I ran into this same issue in my backbone project. I think it all comes down to scalability. Do you ever see the subview needing to become more complicated? If so then it would be better to go ahead keep the subview. If you go the templating solution then down the road you would just need to recreate the subview and wire it up again if you needed something more complicated than the anchors.

    In my project, I did the template iterations for dropdowns. They will never become more complicated. (Most Likely).

    Most other things I went ahead and did the subview so that I wouldn’t have to perform that work later if needed. Also it doesn’t really take to long to implement.

    That’s my 2 cents, but really I don’t think there is a wrong way.

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

Sidebar

Related Questions

There are different ways of calling functions: call stacks, continuation passing, messaging and event
I am processing strings with a date somewhere in it. There are different ways
There are several different ways I can initialize complex objects (with injected dependencies and
In struts I notice there are two different ways to access variables. I am
There seem to be a number of different ways in which one can create
I understand that there are different ways (or permutations) to implementing a JMS Request-Reply
It seems that there are two different ways of declaring sorted associations in Grails
There are different ways to set a member variable from the constructor. I am
There are different ways to show graphics in a page next to text. I
It seems there are different ways the __repr__ function can return. I have a

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.