I have the following dataSource that I retrieve from a json file:
My goal:
Display a list of companies' names in a mobile list view.
When you select a company, it should change views and display a mobile list view of the selected company's people's names.
I can get the first list view to show up and on the click event I can navigate to a new view. How should I approach the second list view?
Can I use a view model to do this? Can you bind the mobile list view's dataSource to the viewModel?
I've created this jsFiddle to ask whether this would be the correct method of doing this: http://jsfiddle.net/RodEsp/p9UQW/
[
{
"Name"
:
"Company 1"
,
"People"
: [{
"Person"
: {
"Name"
:
"Jon"
,
"Job"
:
"IT Guy"
}},
{
"Person"
: {
"Name"
:
"Kate"
,
"Job"
:
"Web Developeresse"
}}]},
{
"Name"
:
"Company 2"
,
"People"
: [{
"Person"
: {
"Name"
:
"Jane"
,
"Job"
:
"IT Girl"
}},
{
"Person"
: {
"Name"
:
"Karl"
,
"Job"
:
"Web Developer"
}}]}
]
My goal:
Display a list of companies' names in a mobile list view.
When you select a company, it should change views and display a mobile list view of the selected company's people's names.
I can get the first list view to show up and on the click event I can navigate to a new view. How should I approach the second list view?
Can I use a view model to do this? Can you bind the mobile list view's dataSource to the viewModel?
I've created this jsFiddle to ask whether this would be the correct method of doing this: http://jsfiddle.net/RodEsp/p9UQW/