# JetApp API

Here you can find the list of all the **JetApp** methods, events, and properties.

## Methods

| Method                                                                               | Use                                                     |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| [attachEvent](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-attachevent) | attaches an event                                       |
| [callEvent](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-callevent)     | calls an event                                          |
| [contains](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-contains)       | checks if the app contains SomeView                     |
| [createView](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-createview)   | creates a new Jet view                                  |
| [getService](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-getservice)   | returns a service                                       |
| [getSubView](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-getsubview)   | returns the current top view of the app                 |
| [getUrl](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-geturl)           | returns an arrays of the URL segments                   |
| [refresh](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-refresh)         | repaints the UI of an app                               |
| [render](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-render)           | renders the app or the app module                       |
| [setService](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-setservice)   | sets a service                                          |
| [show](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-show)               | rebuilds the app or app module according to the new URL |
| [use](https://webix.gitbook.io/webix-jet/api/jetapp-methods#app-use)                 | enables a plugin                                        |

## Events

| Event                                                                                         | Fires                                                                   |
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [app:render](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-render)                 | before each view of an app is rendered                                  |
| [app:route](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-route)                   | after navigation to a view                                              |
| [app:guard](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-guard)                   | before navigation to another view                                       |
| [app:user:login](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-user-login)         | by the *User* plugin when a user logs in                                |
| [app:user:logout](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-user-logout)       | by the *User* plugin when a user logs out                               |
| [app:error](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-error)                   | any error occurs                                                        |
| [app:error:resolve](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-error-resolve)   | when Jet can't find a module by its name                                |
| [app:error:render](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-error-render)     | on errors during view rendering, mostly Webix UI related                |
| [app:error:initview](https://webix.gitbook.io/webix-jet/api/jetapp-events#app-error-initview) | in the case of an error during view rendering, mostly Webix Jet related |

## Properties

| Property                                                                  | Use                                            |
| ------------------------------------------------------------------------- | ---------------------------------------------- |
| [config](https://webix.gitbook.io/webix-jet/api/jetapp-properties#config) | app configuration settings                     |
| [ready](https://webix.gitbook.io/webix-jet/api/jetapp-properties#ready)   | promise that resolves when the app is rendered |
