Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

BUG: ViewComponents model inconsistency with MVC Views. #4882

Closed
Bartmax opened this issue Jun 17, 2016 · 1 comment
Closed

BUG: ViewComponents model inconsistency with MVC Views. #4882

Bartmax opened this issue Jun 17, 2016 · 1 comment
Assignees

Comments

@Bartmax
Copy link

Bartmax commented Jun 17, 2016

Based usage setting the model to ViewData.Model property on a ViewComponent result in the model being null on the view:

// NRE when invoking Default.cshtml

ViewData.Model = new SomeModel();
return View();

// works ok!

var model = new SomeModel();
return View(model);
@Eilon Eilon added this to the 1.0.1 milestone Jun 20, 2016
@NTaylorMullen NTaylorMullen self-assigned this Aug 18, 2016
NTaylorMullen added a commit that referenced this issue Aug 18, 2016
- This is more consistent with how controllers work.

#4882
NTaylorMullen added a commit that referenced this issue Aug 25, 2016
- This is more consistent with how controllers work.

#4882
@NTaylorMullen
Copy link
Contributor

7036e2b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants