Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.

Commit 9a87657

Browse files
author
Kamil Kisiela
committed
Merge branch 'release/0.0.2'
2 parents 8a364d2 + 9e8c2c8 commit 9a87657

File tree

11 files changed

+135
-20
lines changed

11 files changed

+135
-20
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## [Unreleased]
66

7-
## 0.0.1 -
7+
## [0.0.2] - 2015-11-07
8+
### Fixed
9+
- Add missing ngMessages
810

11+
### Added
12+
- showError in Messages wrapper
13+
- md-checkbox
14+
- mdTheme to checkbox, switch
15+
- md-switch
16+
17+
## 0.0.1 - 2015-11-06
18+
19+
[Unreleased]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/0.2.0...HEAD
20+
[0.0.2]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/0.0.1...0.0.2

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ FormlyMaterial
33

44
Material Design Templates for [Angular-Formly](http://angular-formly.com). Modern & flexible forms configured easily in a JSON object.
55

6-
**Angular Formly is not part of Atmosphere. You have to add it manually**
6+
## Add Angular Formly
7+
8+
There is no official Angular Formly package in Atmosphere so you have to add it manually.
79

810
## Install
911

@@ -14,34 +16,36 @@ meteor add mys:angular-formly-templates-material
1416

1517
## Getting Started
1618

17-
1. Add package using `meteor add`
18-
2. Add manually angular-formly library to your project
19-
3. Add the following dependencies to your Angular module:
19+
1. Add package using `meteor add` (see above)
20+
2. Add angular-formly files to your project
21+
3. Add the following dependencies to your AngularJS module:
2022

2123
```javascript
2224
angular.module('myAppName', [
23-
'ngMessages',
24-
'ngMaterial',
25-
'formly',
2625
'formlyMaterial'
2726
])
2827
```
2928

3029
# Components
3130

31+
_rest of angular-material directive in near future_
32+
3233
## Fields
3334

3435
- input
35-
- _rest fields in near future_
36+
- checkbox
3637

3738
## Wrappers
3839

3940
- mdInputContainer
4041
- label
4142
- ngMessages
4243

43-
##Roadmap
44-
- all basic fields
45-
- basic wrappers
44+
## Roadmap
45+
- add md-chips
46+
- add md-datepicker
47+
- add md-icon wrapper
48+
- add md-radio-button and md-radio-group
49+
- add md-select
4650
- e2e tests
4751
- Requests (?). Post an issue.

lib/client/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var {SetModule} = angular2now;
22

33
SetModule('formlyMaterial', [
4+
'ngMessages',
45
'ngMaterial',
56
'formly'
67
])

lib/client/types/checkbox/checkbox.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var {SetModule} = angular2now;
2+
3+
SetModule('formlyMaterial')
4+
.config((formlyConfigProvider, formlyMaterialProvider) => {
5+
6+
formlyConfigProvider.setType({
7+
name: 'checkbox',
8+
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/checkbox/checkbox.ng.html')
9+
});
10+
11+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div>
2+
<md-checkbox ng-model="model[options.key]" md-theme="{{to.mdTheme || 'primary'}}">
3+
{{to.label}}
4+
</md-checkbox>
5+
</div>

lib/client/types/switch/switch.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var {SetModule} = angular2now;
2+
3+
SetModule('formlyMaterial')
4+
.config((formlyConfigProvider, formlyMaterialProvider) => {
5+
6+
formlyConfigProvider.setType({
7+
name: 'switch',
8+
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/switch/switch.ng.html')
9+
});
10+
11+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<md-switch ng-model="model[options.key]" md-theme="{{to.mdTheme || 'primary'}}">
2+
{{to.label}}
3+
</md-switch>

lib/client/wrappers/label/label.ng.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<label for="{{id}}" class="control-label">
1+
<label for="{{id}}">
22
{{to.label}}
33
{{to.required ? '*' : ''}}
44
</label>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<formly-transclude></formly-transclude>
2-
<div ng-messages="fc.$error" ng-show="showError">
2+
<div ng-messages="fc.$error">
33
<div ng-repeat="(name, message) in ::options.validation.messages"
4+
ng-if="showError"
45
ng-message={{::name}}>{{message(fc.$viewValue, fc.$modelValue, this)}}
56
</div>
67
</div>

0 commit comments

Comments
 (0)