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

Ability to pass data properties to the view #5

Merged
merged 1 commit into from
Dec 9, 2014

Conversation

kewah
Copy link
Contributor

@kewah kewah commented Dec 9, 2014

Tjena,

I have added the possibility to pass data to the view directly from the router

routes: {
    '/': {
      componentId: 'my-view',
      isDefault: true,
      data: {
        foo: 'bar'
      }
    }
  }

In my view

ready: function() {
  console.log(this.foo); // > bar
}

This is useful when we need to use the same component for different urls but using different data.

@ayamflow
Copy link
Owner

ayamflow commented Dec 9, 2014

+1, nice add! Tack

@ayamflow ayamflow closed this Dec 9, 2014
@ayamflow ayamflow reopened this Dec 9, 2014
ayamflow added a commit that referenced this pull request Dec 9, 2014
Ability to pass data properties to the view
@ayamflow ayamflow merged commit 1189bd3 into ayamflow:master Dec 9, 2014
@kewah kewah deleted the feature/data-param branch December 10, 2014 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants