code: function(id, view, data, controller) {
      return _getTemplate(data).then(function(template) {
  
        // Controller
        if(controller) {
          var current = $state.current();
          return view.render(template, controller, current.locals);
  
        // Template only
        } else {
          return view.render(template);
        }
      });
    }
docs: Render a view
  
  @param  {String}  id     Unique identifier for view
  @param  {View}    view   A view instance
  @param  {Mixed}   data   Template data, String src to include or Function invocation
  @return {Promise}        A promise fulfilled when currently active view is rendered