Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set title beta 1.0 #915

Closed
sicsol opened this issue Mar 26, 2014 · 8 comments
Closed

Set title beta 1.0 #915

sicsol opened this issue Mar 26, 2014 · 8 comments

Comments

@sicsol
Copy link

sicsol commented Mar 26, 2014

I'm using the following function in a controller which is attached to the body element.

$scope.setNavTitle = function(title) {
$ionicNavBarDelegate.setTitle(title);
}

When i run this function from another controller the page title changes as expected and then disappears when the page slide transition is done.

@ajoslin
Copy link
Contributor

ajoslin commented Mar 27, 2014

Hi @sicsol,

Could you explain the problem further?

From what I understand of the explanation, this sounds like the intended behavior - The navbar will use a new ionView's title attribute when the ion-view loads. If you don't wish this to happen, don't set a title attribute.

@ajoslin ajoslin self-assigned this Mar 27, 2014
@sicsol
Copy link
Author

sicsol commented Mar 27, 2014

@ajoslin I've setup a codepen to show you what the issue is.

http://codepen.io/vialware/pen/nfqFk/

If you click on the sign in button or forgot password button you'll see the title change right before the transition begins. After the transition is done to the new page the title disappears.

@ajoslin
Copy link
Contributor

ajoslin commented Mar 27, 2014

Hmm.. So my above post was wrong. If there's an ion-view without a title attribute, the navBar will transition into no title.

I will make it so the ion-view will only change the navbar's title to blank if you explicitly set <ion-view title=""> - this is probably a breaking change for some apps, but seems more reasonable.

@ajoslin
Copy link
Contributor

ajoslin commented Mar 27, 2014

Fixed!

@sicsol
Copy link
Author

sicsol commented Mar 27, 2014

@ajoslin when will this be available via bower?

@ajoslin
Copy link
Contributor

ajoslin commented Mar 27, 2014

Now! :)

@sicsol
Copy link
Author

sicsol commented Mar 27, 2014

thanks works perfectly

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants