<html lang="en" ng-app=“myDiscuss">
<head><!-- all the script files-->
</head>
<body>
<div class="thumbnail" ng-controller="TabController as tabs”>
<!-- some other div-->
<div ng-show="tabs.isSelected(1)">
<small>No of likes</small>
</div>
<section class="caption" >
<ul class="nav nav-pills">
<li ng-class="{ active:tab === 1 }" >
<a href ng-click="tabs.selectTab(1)">Helpful</a>
</li>
<li ng-class= "{ active:tab === 2 }">
<a href ng-click="tabs.selectTab(2)">Comment</a>
</li>
</ul>
<div class="panel" ng-show="tabs.isSelected(2)">
<blockquote>
<ul class="nav nav-pills">
<li ng-class="{ active:tab === 3 }" >
<a href ng-click="tabs.selectTab(3)" >Helpful</a>
</li>
<li ng-class= "{ active:tab === 4}">
<a href ng-click="tabs.selectTab(4)">Reply</a>
</li>
</ul>
<input type="text" ng-show="tabs.isSelected(4)">
</blockquote>
</div>
</section>
</div>
</body>
</html>
JavaScript File
var app = angular.module("myDiscuss", []);
app.controller("TabController", function() {
this.tab=0;
this.selectTab = function(setTab) {
this.tab= setTab;
};
this.isSelected = (function(checkTab){
return this.tab === checkTab;
});
});
When I click the "Comment" Link it opens the div "panel". However, when I click the "Reply" link, the input tag does not open.
Image with comment and helpful link The div "panel" which opens when the comment link is clicked