This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<h3>Some form properties</h3> | |
<div>The form is valid: {{loginForm.$valid}}</div> | |
<div>The form is invalid: {{loginForm.$invalid}}</div> | |
<div>The form is dirty: {{loginForm.$dirty}}</div> | |
<div>The form is pristine: {{loginForm.$pristine}}</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-show='loginForm.userName.$invalid && loginForm.userName.$dirty' | |
class='error'> | |
Must enter user name.</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ng-grid Sample</title> | |
</head> | |
<body ng-app="app" ng-controller="MainController"> | |
<script src="bower_components/angular/angular.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module("app", []); | |
app.controller("MainController", function($scope){ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="gridStyle" ng-grid="gridOptions"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gridStyle { | |
border: 1px solid rgb(212,212,212); | |
width: 400px; | |
height: 300px | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" type="text/css" href="app.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.myData = [{name: "Moroni", age: 50}, | |
{name: "Tiancum", age: 43}, | |
{name: "Jacob", age: 27}, | |
{name: "Nephi", age: 29}, | |
{name: "Enos", age: 34}]; | |
$scope.gridOptions = { data: 'myData' }; |