Hello I would like to apply the bootstrap styling of the btn-success class upon click and change the class of the other button to btn-warning.
However when I run it the bootstrap styling does not change anything.
Any help would be great. Thanks!
http://plnkr.co/edit/9xV6hRA929sFRDCDBEpy
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<script data-require="[email protected]" src="https://code.angularjs.org/2.0.0-snapshot/angular2.js" data-semver="2.0.0"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="app.js"></script>
<style type="text/css"></style>
</head>
<body ng-controller="MainCtrl">
<br />
<br />
<div class="true col-xs-4">
<button type="button" class="btn btn-lg btn-block" ng-class="{true: 'btn-success', false: 'btn-warning'}[!yupNope.isSelected]" ng-click="!yupNope.isSelected ? (yupNope.isSelected = !yupNope.isSelected) : ''">True</button>
</div>
<div class="false col-xs-4">
<button type="button" class="btn btn-lg btn-block" ng-class="{true: 'btn-warning', false: 'yupNope'}[!yupNope.isSelected]" ng-click="!yupNope.isSelected ? (yupNope.isSelected = !yupNope.isSelected) : ''">False</button>
</div>
</body>
</html>