<code><!DOCTYPE html>
<html lang=
"en"
ng-app=
"app"
>
<head>
<meta charset=
"UTF-8"
>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<title>Title</title>
<script src=
"node_modules/angular/angular.min.js"
></script>
<script src=
"node_modules/angular-ui-router/release/angular-ui-router.min.js"
></script>
</head>
<body>
<p ui-view></p>
<script>
var
app = angular.module(
'app'
, [
'ui.router'
]);
app.config(
function
(
$stateProvider
,
$urlRouterProvider
){
$urlRouterProvider
.otherwise(
'/a/b'
);
$stateProvider
.state(
'a'
, {
url:
'/a'
})
.state(
'a.b'
, {
url:
'/b'
,
template:
'<p>This is b</p>'
})
});
</script>
</body>
</html></code>