11

Could you please share an idea how to change page title for lightning app?

  • 1
    any ideas or attempts you've already made we should not answer ? Please understand that short and limited questions like this show very little effort from your side. That doesn't always motivate people to help you out. – Samuel De Rycke Apr 21 '15 at 11:40
20

Today you can add this:

document.title = "Your Title";

in your .app's init handler:

<aura:handler value="{!this}" name="init" action="{!c.init}"/>

in your app's controller:

init: function(component, event, helper) {
   document.title = "Your Title";
}

This happens a bit later than you would like so you will see Aura in the title for a short interval and then it gets replaced with Your Title.

There is a new feature being exposed in Lightning Components soon that lets you customize the app's "template" markup that will make this both trivial and eliminate the Aura -> Your Title "flash". template= for apps exists already in Aura open source so you can read about it at least - we were waiting on a few changes to the way templates work before exposing them via Lightning where we have to support them in a push update world. See https://github.com/forcedotcom/aura/raw/master/aura_oss.pdf Creating App Templates to get a preview of what is coming to LC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.