code: function(arg) {
      this.isCptComponent = true;
      this.ctlConstuctor=arg.ctlConstuctor;
  
      if (this.template) {
        // this component is associated to a template
        this.createPathObservers();
        this.createCommentBoundaries("cpt");
        this.createChildNodeInstances();
  
        // $init child components
        this.initChildComponents();
        this.ctlWrapper.refresh(); // first refresh
      } else if (arg.cptattelement) {
        // this component is an attribute of another component
        var cw=cptwrapper.createCptWrapper(this.ctlConstuctor, this.getCptArguments());
        this.ctlWrapper=cw;
        this.controller=cw.cpt;
        if (cw.cpt.tagName) {
            log.error(this+" 'tagName' is a reserved keyword and cannot be used in component controllers");
        }
        cw.cpt.tagName=this.tagName;
        // NB the controller $init has not been called yet - this will be done once the parent component has initialized
      }
    }
docs: Initialize the component
  @param {Object} arg
  e.g. {template:obj,ctlConstuctor:obj.controllerConstructor}
  e.g. {cptattelement:obj,ctlConstuctor:obj.controllerConstructor}