> For the complete documentation index, see [llms.txt](https://hemantajax-2.gitbook.io/angular-ui-router/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hemantajax-2.gitbook.io/angular-ui-router/master.md).

# Introduction

State - some place in ui ( may not have template url )

## Setup

```markup
<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.js"></script>
```

```javascript
angular.module("myApp", ['ui.router']);

angular.module("myApp")
    .config(function($stateProvider, $urlRouterProvider){
        $stateProvider.state('home', {
            url: "/home",
            controller: "HomeCtrl", // or "HomeCtrl as h"
            controllerAs: "h",
            templateUrl: "views/home.html"
        });
    });
```

## ui-view - where to place your template

```markup
<ui-view></ui-view>
```
