config.router - Initialization - Author Aide API

Author Aide API Initialization

router

Specifies the router used by Author Aide API.

You would want to use this option which allows you to control the visibility of the current state in the URL. For instance, states like `#/mcq`, `#/true-false`, etc., can either be displayed or hidden. If the 'router' initialization option is set to 'memory', these states will be hidden in the URL. However, if you want to display the current state in the URL, set the 'router' option to 'hash'. This enables navigation using the router hash.

Examples

const initializationOptions = {
    "config": {
        "router": "memory" // or "hash"
    }
};

Values

Attribute path config.router

Default "memory"

Type string

Possible values

  • "memory" - No hashes are added to the URL
  • "hash" - Author Aide will add a hash to the URL to indicate its current state, for example, "#/mcq", "#/true-false", etc.
Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.