Angular Material 1.0.6
Child Alignment
Row
layout-align=” horizontal vertical”
layout=”row” layout-align=”center center”
AAA
layout=”row” layout-align=”space-around center”
_A_A_A__
layout=”row” layout-align=”space-between center”
A_A_A
Column
layout-align=”vertical horizontal”
layout=”row” layout-align=”center center”
layout=”row” layout-align=”space-around center”
| A | A |
layout=”row” layout-align=”space-between center”
A | A
All property: start (default) center end space-around space-between
More info: Child Alignment
$route , for switching views based on location (URL) changes
var someModule = angular.module('someModule', [...module dependencies...])
someModule.config(function($routeProvider) {
$routeProvider.
when('url', {controller:aController, templateUrl:'/path/to/tempate'}).
when(...other mappings for your app...).
...
otherwise(...what to do if nothing else matches...);
)};
$http , for communicating with servers.
Formatting with Filters
12.9 displays: $13
Directive
var appModule = angular.module('app', []);
appModule.directive('ngbkFocus', function() {
return {
link: function(scope, element, attrs, controller) {
element[0].focus();
}
};
});
Usage
<button ngbk-focus ng-click="clickFocused()">
I'm very focuse
</button>
Disable a button in a form
<form name="noteForm">
<md-button ng-disabled="noteForm.$invalid">
</form>
### Reset
$setUntouched()
$setPristine()