Added color coding to test result
This commit is contained in:
parent
1574fb153b
commit
5fa59fbd3d
2 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
||||||
var app = angular.module('myApp', []);
|
var app = angular.module('myApp', []);
|
||||||
app.controller('myCtrl', function($scope) {
|
app.controller('myCtrl', function($scope) {
|
||||||
$scope.test = "Successful!";
|
$scope.test = "Successful!";
|
||||||
|
if($scope.test == "Successful!") {
|
||||||
|
document.getElementById("result").style.color="#00FF00";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
<script src="ascript.js"></script>
|
<script src="ascript.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Angular.js Status: <span style="color:lime;">{{test}}</span></h1>
|
<h1>Angular.js Status: <span ng-bind="test" style="color:red" id="result">Failed!</span></h1>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue