# Vykresli view bez písania handlera

> Cesta bez handlera vykreslí view pomenované podľa jej URL, alebo view, ktoré uvedieš.

Framework: total5
Product: Total.js 5 (total5@0.0.19)
Language: sk
Content-SHA256: 8bba1ca15b229aa5b09820d994087172afec51de322077dcf0bf4e80f2e21ea9
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: total5-installed@total5@0.0.19
Review: not-recorded

Keď cesta nemá handler, Total.js pre ňu vykreslí view: `views/about.html` pre `/about/` a `views/index.html` pre `/`. View môžeš aj pomenovať sám odovzdaním reťazca namiesto funkcie.

```html views/layout.html
<!DOCTYPE html><html><body>@{body}</body></html>
```

```html views/index.html
<h1>Home</h1>
```

```html views/about.html
<h1>About us</h1>
```

```html views/contact-page.html
<h1>Contact</h1>
```

```js controllers/default.js
exports.install = function() {
	ROUTE('GET /');
	ROUTE('GET /about/');
	ROUTE('GET /contact/', 'contact-page');
};
```
