</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script> <style> .form-section {
font-size:14px;
margin:10px 0;
}
.form-section p {
margin:5px 0;
}
.form-section input:not([type='submit']) {
height:18px;
outline:0;
padding:2px 4px;
width:220px;
}
.form-section .custom-error {
color:#FF0000;
}
/* AngularJS CSS class
I wish use style only the input field in the 'AngularJS CSS' paragraph */
#css span.ok, #css span.ko {
display:none;
float: right;
font-size:36px;
margin-top: -12px;
}
#css .ng-pristine {
border:1px solid Gold;
}
#css .ng-dirty.ng-valid {
border:1px solid Green;
}
#css .ng-dirty.ng-invalid {
border:1px solid Red;
}
#css .ng-dirty.ng-valid ~ span.ok {
color:green;
display:inline;
}
#css .ng-dirty.ng-invalid ~ span.ko {
color:red;
display:inline;
}
JavaScript
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', []);
/* Controllers */
function stageController($scope) {
$scope.username2 = 'Clark Kent';
$scope.submitForm = function () {
console.info("Here I should implement the logic to send a request to the server.");
}
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.