am new to angular js using this ihave to perform following operation i have a text name bob.and a button like bold and italic while cliking on the bold button i want to bold the
here is a working fiddle fiddle
HTML:
{{rootFolders}}
rootFolders={{rootFolders}}
JS:
var app = angular.module('myApp',[]);
function MyCtrl($scope) {
$scope.class=""
$scope.chiliSpicy=function(){
$scope.class="text_type_bold"
}
$scope.jalapenoSpicy=function(){
$scope.class="text_type_italic"
}
}
CSS:
.text_type_bold{
font-style:none;
font-weight:bold;
}
.text_type_italic{
font-weight:normal;
font-style:italic;
}