function load( target ) {

      var dfd = $.Deferred();

      dfd.then(function() { delete _view_loading[target]; }, function() { delete _view_loading[target]; } );

      if ( _view_defs[target] ) {

         dfd.resolve( _view_defs[target] );

      } else {

         _view_loading[target] = dfd;
         require( [Fiber.viewPath + target, 'text!' + Fiber.viewPath + target + '.html'], function( view, template ) {
            if ( view === void 0 || template === void 0 ) {
               dfd.reject();
            } else {
               view.prototype.instanceOf = target;
               view.prototype.template = _.template( template );
               _view_defs[target] = view;

               dfd.resolve( view );
            }
         },
         function( err ) {
            dfd.reject( err );
         });
      }

      return dfd.promise();
   }
/**
   *  Wraps RequireJS and loads view modules with their template files.  Modifies the
   *  prototype with the view module name and the pre-compiled template function.
   */
Wraps RequireJS and loads view modules with their template files.  Modifies the
prototype with the view module name and the pre-compiled template function.
Wraps RequireJS and loads view modules with their template files . Modifies the prototype with the view module name and the pre - compiled template function .
function load( target ) {
      var dfd = $.Deferred();
      dfd.then(function() { delete _view_loading[target]; }, function() { delete _view_loading[target]; } );
      if ( _view_defs[target] ) {
         dfd.resolve( _view_defs[target] );
      } else {
         _view_loading[target] = dfd;
         require( [Fiber.viewPath + target, 'text!' + Fiber.viewPath + target + '.html'], function( view, template ) {
            if ( view === void 0 || template === void 0 ) {
               dfd.reject();
            } else {
               view.prototype.instanceOf = target;
               view.prototype.template = _.template( template );
               _view_defs[target] = view;
               dfd.resolve( view );
            }
         },
         function( err ) {
            dfd.reject( err );
         });
      }
      return dfd.promise();
   }
function load ( target ) { var dfd = $ . Deferred ( ) ; dfd . then ( function ( ) { delete _view_loading [ target ] ; } , function ( ) { delete _view_loading [ target ] ; } ) ; if ( _view_defs [ target ] ) { dfd . resolve ( _view_defs [ target ] ) ; } else { _view_loading [ target ] = dfd ; require ( [ Fiber . viewPath + target , 'text!' + Fiber . viewPath + target + '.html' ] , function ( view , template ) { if ( view === void 0 || template === void 0 ) { dfd . reject ( ) ; } else { view . prototype . instanceOf = target ; view . prototype . template = _ . template ( template ) ; _view_defs [ target ] = view ; dfd . resolve ( view ) ; } } , function ( err ) { dfd . reject ( err ) ; } ) ; } return dfd . promise ( ) ; }
Wraps RequireJS and loads view modules with their template files.
Wraps RequireJS and loads view modules with their template files .