     else
       @scope = undefined
 
+    if @innerTemplate
+      if(template = @el.html()) isnt ''
+        @template = template
+        @el.empty()
+
   append: (controller)->
     @yield or= @el.find('[ui-yield]')[0] or @el[0]
     $(@yield).append controller.el or controller

  scope: true
  inheritScope: true

  constructor: ->
    super


    Object.defineProperty @, key,
      value: value
      enumerable: false
      configurable: false
      writable: true

  addOwnProperty: (key, value)->
    Object.defineProperty @, key,
      value: value
      enumerable: true
      configurable: false
      writable: true

