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

Declare RouteConfig.navModel for TypeScript projects #285

Closed
heruan opened this issue Feb 1, 2016 · 1 comment
Closed

Declare RouteConfig.navModel for TypeScript projects #285

heruan opened this issue Feb 1, 2016 · 1 comment
Assignees

Comments

@heruan
Copy link

heruan commented Feb 1, 2016

I'm porting my projects to TypeScript, and I was used to dynamically set the page title in the activate function:

activate(params, routeConfig, navigationInstruction) {
    routeConfig.navModel.setTitle("My Title");
    // This is simplified, the title will be set after retrieving server side info
}

but using TypeScript I've found the RouteConfig.navModel property isn't declared and the compiler complains:

Property 'navModel' does not exist on type 'RouteConfig'.
@jwahyoung
Copy link
Contributor

@heruan Thank you for the contribution. I can verify that the property exists in the ES2016 skeleton. The Typescript definition files are generated from the codebase itself, so feel free to submit a pull request with the necessary file changes for this fix.

@EisenbergEffect This may need the bug tag.

jwahyoung added a commit to jwahyoung/router that referenced this issue Feb 13, 2016
The property "navModel" exists on the RouteConfig object, but it was missing from the interface, breaking Typescript. It is now added.

Fixes aurelia#285.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants