title: Render View with Multiple ajax Calls -
body: <p>I have already seen the similar question in SO
  <a href="https://stackoverflow.com/questions/18925792/rendering-a-view-after-multiple-asynchronous-ajax-calls-with-backbone">Rendering a view after multiple asynchronous ajax calls with Backbone</a></p>
  
  <p>And unfortunately , the solution is behaving weird for me
  I can see the render is getting called before the ajax completes</p>
  
  <p>This my Code</p>
  
  <pre><code>var LoginView = Backbone.View.extend({
  
    initialize : function(){
          var _this = thisl
          var templateLoading  = $.get('template.html', function(template){
                    this.template = template;
          });
  
       $.when(templateLoading).done(function(){ _this.render()});
    },
  
  render : function(){
      console.log('Rendering');
      $.tmpl(this.template).appendTo(this.el);
  }
  
  });
  </code></pre>
  
  <p>AppRouter:</p>
  
  <pre><code>//Route
  var view = new LoginView;
  console.log('View in APP Router');
  console.log(view.$el.html());
  </code></pre>
  
  <p>When i run this, it prints in this order</p>
  
  <pre><code>View in App Router
  empty string
  Rendering
  </code></pre>
  
  <p>what am I missing ?</p>