|
@ -5,10 +5,19 @@ require './not_found/not_found' |
|
|
|
|
|
|
|
|
tag router |
|
|
tag router |
|
|
|
|
|
|
|
|
|
|
|
prop component watch: yes |
|
|
|
|
|
|
|
|
def setup |
|
|
def setup |
|
|
@r = R |
|
|
@r = R |
|
|
@t = Imba:TAGS |
|
|
@component = null |
|
|
|
|
|
@cache = {} |
|
|
|
|
|
|
|
|
|
|
|
def componentDidSet val, prev |
|
|
|
|
|
removeChild(prev) if prev |
|
|
|
|
|
appendChild(val) if val |
|
|
|
|
|
self |
|
|
|
|
|
|
|
|
def render |
|
|
def render |
|
|
self:__:A = self:__:A || {} |
|
|
var view = @data || @r:view |
|
|
<self> ( self:__:A[@r:view] || self:__:A[@r:view] = @t[@r:view.toUpperCase]() ).end |
|
|
component = @cache[view] ||= Imba.createElement(view,null,null,self) |
|
|
|
|
|
component.end |
|
|