docs: function getCtrlTemplateModel(uipart, options) {
  
      var remodelOnScopeChange = uipart.remodelOnScopeChange || (uipart.remodel && uipart.remodel.onScopeChange);
      var remodelOnEvent = uipart.remodelOnEvent || (uipart.remodel && uipart.remodel.onEvent);
      var rerenderOnScopeChange = uipart.rerenderOnScopeChange || (uipart.rerender && uipart.rerender.onScopeChange);
      var rerenderOnEvent = uipart.rerenderOnEvent || (uipart.rerender && uipart.rerender.onEvent);
      var remodelWatchers = remodelOnScopeChange ? JSON.stringify(remodelOnScopeChange) : 'null';
      var remodelEvents = remodelOnEvent ? JSON.stringify(remodelOnEvent) : 'null';
      var rerenderWatchers = rerenderOnScopeChange ? JSON.stringify(rerenderOnScopeChange) : 'null';
      var rerenderEvents = rerenderOnEvent ? JSON.stringify(rerenderOnEvent) : 'null';
  
      var defaults = uipart.defaults ? JSON.stringify(uipart.defaults) : 'null';
      var presets = uipart.presets ? JSON.stringify(uipart.presets) : null;
      var attachToScope = uipart.attachToScope ? JSON.stringify(uipart.attachToScope) : null;
      var paramInfo = this.getFilteredParamInfo(uipart.controller, options);
      var transOpts = _.extend({ raw: true, isClient: true }, options);
      var useRemodelOnWatch = uipart.model && remodelOnScopeChange && remodelOnScopeChange.length;
      var useRemodelOnEvent = uipart.model && remodelOnEvent && remodelOnEvent.length;
      var useRerenderOnWatch = uipart.model && rerenderOnScopeChange && rerenderOnScopeChange.length;
      var useRerenderOnEvent = uipart.model && rerenderOnEvent && rerenderOnEvent.length;
      var remodelFnExists = uipart.model && _.isFunction(uipart.model);
      var remodelObjExists = !remodelFnExists && uipart.model && _.isObject(uipart.model);
      var clientLoadExists = uipart.onClientLoad && _.isFunction(uipart.onClientLoad);
  
      // hack to get log working in uipart
      if (paramInfo.list && paramInfo.list.length) {
          paramInfo.list = paramInfo.list.filter(function (val) {
              return val !== 'log';
          });
  
          paramInfo.converted = paramInfo.converted.filter(function (val) {
              return val !== 'log';
          });
      }
  
      return {
          isPage:             options.isPage,
          params:             paramInfo.list,
          convertedParams:    paramInfo.converted,
          ngrefs:             paramInfo.ngrefs,
          defaults:           defaults,
          presets:            presets,
          attachToScope:      attachToScope,
          rerenderExists:     useRerenderOnEvent || useRerenderOnWatch,
          remodelFnExists:    remodelFnExists && (useRemodelOnEvent || useRemodelOnWatch || !options.isPage),
          remodelFn:          remodelFnExists && this.transformers.basic.transform(uipart.model, transOpts),
          remodelObjExists:   remodelObjExists,
          remodelObj:         remodelObjExists && this.renderObjFns(uipart.model, transOpts),
          clientLoadExists:   clientLoadExists,
          clientLoadFn:       clientLoadExists && this.transformers.basic.transform(uipart.onClientLoad, transOpts),
          remodelWatchers:    remodelWatchers,
          remodelEvents:      remodelEvents,
          rerenderWatchers:   rerenderWatchers,
          rerenderEvents:     rerenderEvents,
          useRemodelOnWatch:  useRemodelOnWatch,
          useRemodelOnEvent:  useRemodelOnEvent,
          useRerenderOnWatch: useRerenderOnWatch,
          useRerenderOnEvent: useRerenderOnEvent,
          validations:        this.renderObjFns(uipart.validations, transOpts),
          eventBusListeners:  this.renderObjFns(uipart.eventBusListeners, transOpts),
          uiEventHandlers:    this.renderObjFns(uipart.uiEventHandlers, transOpts),
          body:               this.getModuleBody(uipart.controller)
      };
  }