Class: Application

Application

new tart.mvc.Application(dom)

Base application class for tart.mvc.

Name Type Description
dom HTMLElement optional

Optional DOM element to render the application in.

Members

protectedbasePathstring

The base path for the application. If your application will run in the root domain (such as http://www.foo.com) your application doesn't need to override this property. On the other hand, if it will run in a subdirectory (such as http://www.foo.com/bar/) you need to override and set this property to the subdirectory (such as '/bar/').

protecteddefaultRoutetart.mvc.uri.Route

The default route fallback, which will be used if there are no matching routes found for a given url.

initRouting

Users of tartMVC should implement this method. It should include all the routing jobs (adding routes to the router)

protectedredirectionTypetart.mvc.uri.Router.RedirectionType

The default redirection type for an MVC application.

Methods

protecteddefaultLayout()

The default layout view of the application.

Returns:
Type Description
tart.mvc.Renderer The renderer instance. This method creates a single renderer instance if it's not already been created.
Returns:
Type Description
tart.mvc.uri.Router The router of the application.

protectedonNavigate()

template_container(){string}

Returns:
Type Description
string Container template for the application. Developers may override this method for their own likes; or not use it at all if they provide a dom object to this class's constructor.