locked
data-homePage information

    Question

  • Hi,

    I'm just started to develop a Metro application with JavaScript. I wanted to go step by step, so when I read the default.html code, I saw there is "data-homePage" attribute in the body label. The property value is a relative path to the landing page, so it is quite obvious what this property is for.

    However, I wanted to give it a look in MSDN to get more info about it, but I cannot find it anywhere. I thought I would find it in the "HTML and DOM reference" (http://msdn.microsoft.com/en-us/library/windows/apps/br212882.aspx), but under the body label section there isn't any reference to it.

    Is there any other place where I can find info about this property or there won't be any more info until future releases of the new SO?

    Thanks for your help.

     


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.
    Saturday, February 04, 2012 12:00 PM

Answers

  • Hi Javier,

    This property is used by the templates.  It is not really an API or standard method but simply used by our templates to provide information.  You can use this same technique in your own applications.  For an example of how this is used, create a gridview application from the templates.  You will see in default.js this is used to get a variable homePage which is used in the activated code to navigate to this page.

    -Jeff


    Jeff Sanders (MSFT)
    Monday, February 06, 2012 3:22 PM
    Moderator

All replies

  • Hi Javier,

    This property is used by the templates.  It is not really an API or standard method but simply used by our templates to provide information.  You can use this same technique in your own applications.  For an example of how this is used, create a gridview application from the templates.  You will see in default.js this is used to get a variable homePage which is used in the activated code to navigate to this page.

    -Jeff


    Jeff Sanders (MSFT)
    Monday, February 06, 2012 3:22 PM
    Moderator
  • Hi Jeff,

    I will try it.

    Thanks for your answer.


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.

    Tuesday, February 07, 2012 10:26 PM