Note that there are some explanatory texts on larger screens.

plurals
  1. POusing Backbone JS boilerplate & code navigation
    primarykey
    data
    text
    <p>a newbe question: I've downloaded the backbone boilerplate from <a href="https://github.com/david0178418/BackboneJS-AMD-Boilerplate" rel="nofollow">https://github.com/david0178418/BackboneJS-AMD-Boilerplate</a> it uses require.js and I wonder about the code navigation during development.</p> <p>Here is my question: let's say I have 2 views one extend the other like so:</p> <p>View 1:</p> <pre><code>define([ 'underscoreLoader', 'backboneLoader', 'text!templates/main.html' ], function (_, Backbone, MainTemplate) { "use strict"; return Backbone.View.extend({ template:_.template(MainTemplate), initialize:function () { this.render(); }, log:function(msg){ console.log(msg); }, render:function () { this.$el.append(this.template({})); return this; } }); } ); </code></pre> <p>View 2:</p> <pre><code>define([ 'underscoreLoader', 'backboneLoader', 'text!templates/other.html', 'views/main-view' ], function (_, Backbone, MainTemplate,MainView) { "use strict"; // how would you navigate to MainView (main-view.js) return MainView.extend({ template:_.template(MainTemplate), initialize:function () { this.render(); }, render:function () { this.log("my message"); this.$el.append(this.template({})); return this; } }); } ); </code></pre> <p>Now when I develop (I use IntelliJ) I would like to middle click <strong>MainView</strong> on the extended view and navigate to the code without having to browse the project tree.</p> <p>Is that possible using this boilerplate? is there a better approach or a better boilerplate?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload