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

Change data namespaces #4

Open
rosshadden opened this issue Jan 26, 2015 · 0 comments
Open

Change data namespaces #4

rosshadden opened this issue Jan 26, 2015 · 0 comments

Comments

@rosshadden
Copy link
Member

  • res.view.model should be the main data the view needs
  • res.view.{{anything}} should be any extra data the view needs
  • in debug mode, res.private should contain all keys on res.view
  • res.view.public should be any data you want to be available to CS.public
  • res.view([view], {key:value, model:{key:value}}, {public});
    • the first param in view is the path as always, which can be omitted
    • the 2nd param in the view is an extension of res.view properties, where one of them can be model which would extend the model
    • res.view({ foo: "bar", model: { sean: "clark" }});
      • {{foo}}
      • {{model.sean}}
      • it would extend any other res.view.model that existed in that res/req chain
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

1 participant