D
D
Danil2014-03-20 19:02:33
JavaScript
Danil, 2014-03-20 19:02:33

How to use different templates for routes?

I write on the backbone. How can I make different routes use different templates? For example, for test1.ru/users there was a users.html template, and for test1.ru/teams there was teams.html?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Starkov, 2014-03-20
@icelaba

backbonetutorials.com/what-is-a-router
and if you don't have enough info here
robdodson.me/blog/2012/05/23/how-do-you-switch-bet...

D
DrNemo, 2014-03-20
@DrNemo

Here you need MVC read: en.wikipedia.org/wiki/Model-View-Controller
you need a class for working with templates, which will allow you to switch the template with 1 call.
And it’s better to take a ready-made framework, everything is already there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question