I am new to AngularJS. What I have done till now is, I have one controller and it's displaying some data. What I would like to do it, on-click on that data, display different div. What is the best way to do this ? Would like to follow MVC pattern. Also want to pass some data to another div.
Thanks
<body>
<div ng-controller="Aircraft">
<div>
Search: <input ng-model="search.AC">
<table style="width:500px">
<tbody style="background-color:#4db4fa; ">
<tr>
<th scope="col">AC</th>
<th scope="col">Fleet</th>
<th scope="col">FltNum</th>
<th scope="col">StnFrom</th>
<th scope="col">StnTo</th>
<th scope="col">Status</th>
</tr>
<tr ng-repeat="Aircrafts in FlightAndAircraft | filter:search" align="center">
<td><button ng-click=" **** ***** HIDE THIS DIV AND DISPLAY NEXT DIV AND PASS {{Aircrafts.AC}} ***** *****" >{{Aircrafts.AC}} </button></td>
<td> {{Aircrafts.Fleet}} </td>
<td> {{Aircrafts.FltNum}} </td>
<td> {{Aircrafts.StnFrom}} </td>
<td> {{Aircrafts.StnTo}} </td>
<td> {{Aircrafts.Status}} </td>
</tr>
</tbody>
</table>
</div>
<div>
<table style="width:500px">
<tbody style="background-color:#4db4fa; ">
<tr>
<th scope="col">AC</th>
<th scope="col">Fleet</th>
</tr>
<tr ng-repeat="Aircrafts in FlightAndAircraft | filter:search" align="center" ng-click="go(Aircrafts)">
<td> {{Aircrafts.AC}} </td>
<td> {{Aircrafts.Fleet}} </td>
</tr>
</tbody>
</table>
</div>
</div>