Is it possible to have an element hidden by default (so that it does not show if JavaScript is disabled), and in AngularJS redefine the style to display it?
I have a function in an area that should return an override style to display an element:
$scope.style = function() {
return { "display": "block!important" };
}
The element itself has its own CSS code, as well as a directive ng-style:
<h4 class="original" ng-style="style()">
CSS first hides the element:
.original {
display: none;
}
There is a broken demonstration here .
source
share