1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 02:18:20 +01:00
antd-web-apps/apps/silk/Router.lua

35 lines
538 B
Lua
Raw Normal View History

2018-08-21 15:16:36 +02:00
--define the class
Router = Object:extends{registry = {}}
function Router:setPath(path)
self.path = path
end
function Router:initialize()
self.args = {}
self.routes = {}
end
function Router:setArgs(args)
self.args = args
end
function Router:arg(name)
return self.args[name]
end
function Router:getController(url)
-- TODO
end
function Router:delegate()
-- TODO
end
function Router:setInitRoute(name, url, visibility)
self.routes[name] = {
url = url,
visibility = visibility
}
end