2
私はindex.htmlにui-view
を持っています。私は情報用のページを持っています。そこに4つのリンクを持つ2番目のui-viewを入れたいと思います。私のindex.htmlでui-viewの角型UI-Router ui-view
<body ng-app="myApp">
<div ui-view></div>
</body>
これは私の情報です。 info.htmlのinfo-number.htmlページでデフォルトを開きたい
<div class="col-sm-8" style="border:1px solid; min-height:
<h1>Some text</h1>
<div ui-sref></div>
</div>
これは私のアプリです。情報
助けてくれてありがとうのための私のページの
myApp.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
.state("home", {
url: "/home",
templateUrl: "home.html"
})
.state("info", {
url: "/info",
templateUrl: "info.html",
})
.state("info-number", {
abstract: true,
parent: "info",
url: "/info-number",
templateUrl: "info-number.html"
})
.state("info-about", {
parent: "info",
url: "/info-about",
templateUrl: "info-about.html"
})
.state("info-where", {
parent: "info",
url: "/info-where",
templateUrl: "info-where.html"
})
}
]);
スキーマ。
こんにちはマキシムTNXを、それが動作します! – mrkibzk