.error{background-color: red;}
.warning{background-color: yellow;}
app.controller("headerController",function($scope){
$scope.isError=false;
$scope.isWarning=false;
$scope.showError=function(){
$scope.messageText="this is an error";
$scope.isError=true;
$scope.isWarning=false;
}
$scope.showWarning=function(){
$scope.messageText="just a warning";
$scope.isError=false;
$scope.isWarning=true;
}
});
{{messageText}}
error
warning