Added color coding to test result

This commit is contained in:
CommanderStrax 2015-12-23 16:53:41 -06:00
parent 1574fb153b
commit 5fa59fbd3d
2 changed files with 4 additions and 1 deletions

View file

@ -1,4 +1,7 @@
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.test = "Successful!";
if($scope.test == "Successful!") {
document.getElementById("result").style.color="#00FF00";
}
});

View file

@ -5,6 +5,6 @@
<script src="ascript.js"></script>
</head>
<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>
</html>