JSFiddle - React, Tailwind, and code Playground
HTML
<section ng-app="test" ng-controller="Ctrl as loc">
<select ng-model="showLoc" class="form-control" ng-options="place.abbreviation as place.name for place in places">
<option value="">Choose One</option>
</select>
<div ng-switch="showLoc">
<div ng-switch-when="DC">
<table class="table">
<thead>
<tr>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">Metro</a></td>
</tr>
<tr>
<td><a href="#">Capital</a></td>
</tr>
</tbody>
</table>
</div>
<div ng-switch-when="NY">
<table class="table">
<thead>
<tr>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr >
<td><a href="#">Subway</a></td>
</tr>
<tr>
<td><a href="#">Yankees</a></td>
</tr>
</tbody>
</table>
</div>
</section>
JavaScript
(function(){
"use strict";
angular.module('test', []).controller('Ctrl', function ($scope) {
$scope.places = [{ abbreviation:'NY', name: 'New York', properties: ['Subway', 'Yankees']}, {abbreviation: 'DC', name:'District of Columbia', properties: ['Metro', 'Captial']}];
this.setTab = function(setTab) {
this.tab = setTab;
};
this.isSelected = function(checkTab) {
return this.tab === checkTab;
};
this.notSelected = function(checkTab) {
return !(this.isSelected(checkTab));
};
this.getTab = function() {
return this.tab;
};
this.setIsDefault = function() {
this.isDefault = true;
};
this.getIsDefault = function() {
return this.isDefault;
};
});
})();