Can i refer a Backbone View component into another component View

99 views Asked by At

I have a component Lets say A - which has the following structure consisting of Config, models, templates, views.

I have another component B, which has the same structure but different code.

Now I want to call component A's views into component B, is it possible to do it in Backbone JS? I have read through online everywhere but couldn't find any leads on this.

I am mainly talking about the jstpl files in templates, which are just limited to own components. Is there any way I can use jstpl templates of Component into Component B.

If not, what will be an alternative solution to achieve this.

1

There are 1 answers

1
shweta On BEST ANSWER

You need to reference it with '../../path_to_file' when you need a file from another folder.

It does not matter if it is a jstpl files or js files or anything else. It just reference the file and gives it a reference name.