Camillia
asked on
New to Angular - How do I define the table columns
I had this question after viewing New to Angular (read tutorial) - How do I bind to this table?.
I got some of the Angular pieces together by using the post above. I need help with a couple of things I will post my other question in another thread
1. Table columns
This is what I have now
1. Model In here I have several fields but I have this list
and "Contacts" looks like this (it has more fields). This is table generated by edmx, I think
Now, I have the table like this but I don't think this is correct
But I don't think {row.firstName}} is correct. "contacts" in the model is a list of Contacts. So, how do I get to the properties of "Contacts"?
I got some of the Angular pieces together by using the post above. I need help with a couple of things I will post my other question in another thread
1. Table columns
This is what I have now
1. Model In here I have several fields but I have this list
public List<Contacts> contacts {get; set;}
and "Contacts" looks like this (it has more fields). This is table generated by edmx, I think
public string districtName {get;set;}
public string firstName {get;set;}
public string Email {get;set;}
....
Now, I have the table like this but I don't think this is correct
<div ng-controller ="contactController" st-table ="contactDetails">
<thead>
<tr>
<th st-sort="firstName" class="sortable"> First Name </th>
.....
</tr>
</thead>
<tbody>
<tr ng-repeat="row in contactDetails" ng-class="...">
<td>{row.firstName}} </td>
</tr>
</tbody>
</div>
But I don't think {row.firstName}} is correct. "contacts" in the model is a list of Contacts. So, how do I get to the properties of "Contacts"?
ASKER
ah, let me look. I'll post back. I don't I have that.
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ah, let me add that. I have another question. I want to make sure I have the different pieces together and get the $scope right. I'll open another question.
Open in new window
</div>