ion-view
not showing page title properly. I have check with more number of code pen they are working very well but in my case its giving some issue. Lets I describe my situation.
Having an login page in this login.html page I am showing the ion-view with title Sign-In <ion-view view-title="Sign-In" name="login-view">
on this same page is having link for forgot password in which I opened the new view for forgotpassword.html page but on this page I have mention the title <ion-view view-title="Forgot Password">
but click forgotpassword link it shows me Sign-In as title on forgot password page.
aap.js
.config(function ($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
$ionicConfigProvider.backButton.icon('ion-ios-arrow-left');
$stateProvider
.state('login', {
url: '/login',
templateUrl: 'templates/login.html',
controller: 'LoginCtrl'
})
.state('forgotPassword', {
url: '/forgotPassword',
templateUrl: 'templates/forgotpassword.html',
controller: 'ForgotPasswordController'
})
$urlRouterProvider.otherwise('/other');
})
login.html
<ion-view view-title="Sign-In">
<ion-content scroll="true">
<form name="frmLogin">
<div class="item item-divider" style="text-align: center;font-size: 16px;color: #fff;">
Enter your account credentials
</div>
<div class="item item-text-wrap">
<div class="list">
<label class="item item-input item-floating-label">
<span class="input-label" style="opacity: 0;">Email Address</span>
<input type="email" name="username" placeholder="Email address" ng-model="userLoginEmail">
</label>
<span ng-show="frmLogin.username.$touched && frmLogin.username.$invalid" style="color:#f57878;margin-left: 7px;font-size: 11px;margin: 2px 2px;">Email address should be in correct format.</span>
<label class="item item-input item-floating-label">
<span class="input-label" style="opacity: 0;">Password</span>
<input type="password" name="password" placeholder="Password" ng-
model="userLoginPassword" ng-required="true" keyboard-attach>
</label>
<span ng-show="frmLogin.password.$touched && frmLogin.password.$invalid" style="color:#f57878;margin-left: 7px;font-size: 11px; margin: 2px 2px;">Password should not be empty.</span>
</div>
</div>
<div class="item item-divider">
<button type="submit" class="button button-full button-positive">Sign In</button>
</div>
<div class="item item-divider">
<a href="#" ui-sref="forgotPassword" ui-sref-active="active">I don't remember my password. Help me.</a> // click on this link
</div>
</form>
</ion-content>
</ion-view>
forgotpassword.html
<ion-view view-title="Forgot Password">
<ion-content>
</ion-content>
</ion-view>
when I click on the <a href="#" ui-sref="forgotPassword" ui-sref-active="active">
I don’t remember my password. Help me. this link it shows me the Sign-In title on the ForgotPassword.html page.
This is my system info
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
OS: Windows 10
Node Version: v4.4.7