【发布时间】:2015-11-08 12:18:44
【问题描述】:
我会尽量保持简单,同时不会丢失问题的上下文。
假设我有一个使用 ui-router 的状态
$stateProvider.state("home", {
abstract: true,
templateUrl: "...",
meta: {
label: "...",
...
}
});
如何访问当前状态的meta 对象的属性和值,以便将它们应用到视图中,例如:
<section class="content-header">
<h1>
{{meta.label}}
</h1>
</section>
因此,上面的示例将显示来自当前状态的meta 对象的label 的值。
【问题讨论】:
标签: angularjs angular-ui-router