GaG*_*aGa 12 angularjs ionic-framework
我使用离子宠物模板.我有一个关于宠物详情页面的问题,如果我想在标题上有一个动态标题,它将不会显示任何内容,直到我重新加载页面(使用网络浏览器),但我认为它没有意义,因为我会喜欢制作应用程序.我想念什么吗?我能做什么?
这是我的代码如下:
<ion-nav-bar class="bar-positive">
<div class="buttons" ng-controller="BackCtrl">
<a class="button button-icon icon ion-chevron-left" ng-click="$back()"></a>
</div>
<h1 class="title"> {{ current_pet.name }} </h1>
Run Code Online (Sandbox Code Playgroud)
..
dk1*_*123 34
如果您正在使用ion-view,请使用此:
<ion-nav-title>
{{ PageTitle }}
</ion-nav-title>
Run Code Online (Sandbox Code Playgroud)
把它放在你的外面ion-content.
在我的应用程序中,我使用过:
<ion-view title="{{Properties.Title}}">
Run Code Online (Sandbox Code Playgroud)
其中Properties是我的作用域上的一个对象(我有一种主控制器),我在每个"内部控制器"上"覆盖".