# Initialization

Once the app layout and navigation is set up, we will need to initialize the app.

The app initialization code is defined inside `/assets/custom/js/init.js` file.

Define the app parameters inside:

```javascript
window.app = new Framework7({

});
```

{% hint style="info" %}
For app initialization parameters, visit <https://framework7.io/docs/app>
{% endhint %}

If you want to run any functions just after the app has been initialized, call them inside `app.on('init', function() {` event handler.

After the initialization parameters have been defined, we need to manually call the app initialization method inside `index.html` file.

In the `index.html` file, this code is added inside the `<script>` tag just before the closing `</body>` tag.

```javascript
window.onload = function() {
    app.init();
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pmsgz.gitbook.io/nectar/basics/app-initialization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
