Mobile Builder – Page Data

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #236025

    Darren Bryant

    I would like to dynamically set data to be passed to a page using typescript in the Page data property. The notes say that this should be an object, not text. What format can I use to build the object using a TypeScript expression? I have tried several but I always end up getting an error “Resolve Error : TypeError: Cannot read property ‘substring’ of undefined”


    Gregory Vorbe

    Hello Darren,

    In the “Page data” property of a “Push page” action the data format has to be a JSON object.
    For example:

    _ Directly in the property, in TS mode:

    {'test': 'data', 'test2': 25}

    In this case, this must be used with single quotes only.

    _ In the page class, you define your object variable:

    	public PageData: object = {"test": "data", 'test2': 25};

    And in the “Page data” property:

    You can retrieve your data in the new page with:



    to get it as a string.


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.