In my app i have four tabs, on click of one tab a class name will be added, By using that class name CSS are written. I have implemented the same in jquery by adding the class on Tab click, but in angular I am finding it difficult, someone help me out in this.
HTML
<div id="main-tabs">
<div class="name-des">
<h4>Hi Divya</h4>
<p>As an admin what would you like to do today? </p>
</div>
<div class="allwindows " ng-style="updateMargin">
<a href="#addpfm" class="viewawards">
<p>Add PFM/GI</p>
</a>
<a href="#/awards" class="addawards">
<p>Manage Awards</p>
</a>
<a href="#/nomination" class="nomination">
<p>Manage Nomination <br/>
Window</p>
</a> <a href="#/report" class="report">
<p>Report</p>
</a>
</div>
<div ng-view class="reveal-animation animate-show"></div>
</div>
SCRIPT
app.controller('nominationController', function($scope) {
changeTabs("yellow");
});
app.controller('awardsController',function($scope){
changeTabs("green");
});
app.controller('reportController',function($scope){
changeTabs("red");
});
app.controller('addpfmController',function($scope){
changeTabs("blue");
});
app.controller('reportController',function($scope){
changeTabs("red");
});
function changeTabs(className){
$("#main-tabs").attr("class", className);
$('.name-des').hide( 3000 );
}
Here is the function written in jquery. I need to replace this code with angular code, Someone help me out.
Thanks