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

Commit

Permalink
Merge branch 'release/0.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela committed Nov 6, 2015
2 parents 8a364d2 + 9e8c2c8 commit 9a87657
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 20 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## 0.0.1 -
## [0.0.2] - 2015-11-07
### Fixed
- Add missing ngMessages

### Added
- showError in Messages wrapper
- md-checkbox
- mdTheme to checkbox, switch
- md-switch

## 0.0.1 - 2015-11-06

[Unreleased]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/0.2.0...HEAD
[0.0.2]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/0.0.1...0.0.2
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ FormlyMaterial

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

**Angular Formly is not part of Atmosphere. You have to add it manually**
## Add Angular Formly

There is no official Angular Formly package in Atmosphere so you have to add it manually.

## Install

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

## Getting Started

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

```javascript
angular.module('myAppName', [
'ngMessages',
'ngMaterial',
'formly',
'formlyMaterial'
])
```

# Components

_rest of angular-material directive in near future_

## Fields

- input
- _rest fields in near future_
- checkbox

## Wrappers

- mdInputContainer
- label
- ngMessages

##Roadmap
- all basic fields
- basic wrappers
## Roadmap
- add md-chips
- add md-datepicker
- add md-icon wrapper
- add md-radio-button and md-radio-group
- add md-select
- e2e tests
- Requests (?). Post an issue.
1 change: 1 addition & 0 deletions lib/client/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var {SetModule} = angular2now;

SetModule('formlyMaterial', [
'ngMessages',
'ngMaterial',
'formly'
])
Expand Down
11 changes: 11 additions & 0 deletions lib/client/types/checkbox/checkbox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var {SetModule} = angular2now;

SetModule('formlyMaterial')
.config((formlyConfigProvider, formlyMaterialProvider) => {

formlyConfigProvider.setType({
name: 'checkbox',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/checkbox/checkbox.ng.html')
});

});
5 changes: 5 additions & 0 deletions lib/client/types/checkbox/checkbox.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div>
<md-checkbox ng-model="model[options.key]" md-theme="{{to.mdTheme || 'primary'}}">
{{to.label}}
</md-checkbox>
</div>
11 changes: 11 additions & 0 deletions lib/client/types/switch/switch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var {SetModule} = angular2now;

SetModule('formlyMaterial')
.config((formlyConfigProvider, formlyMaterialProvider) => {

formlyConfigProvider.setType({
name: 'switch',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/switch/switch.ng.html')
});

});
3 changes: 3 additions & 0 deletions lib/client/types/switch/switch.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<md-switch ng-model="model[options.key]" md-theme="{{to.mdTheme || 'primary'}}">
{{to.label}}
</md-switch>
2 changes: 1 addition & 1 deletion lib/client/wrappers/label/label.ng.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<label for="{{id}}" class="control-label">
<label for="{{id}}">
{{to.label}}
{{to.required ? '*' : ''}}
</label>
Expand Down
3 changes: 2 additions & 1 deletion lib/client/wrappers/messages/messages.ng.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<formly-transclude></formly-transclude>
<div ng-messages="fc.$error" ng-show="showError">
<div ng-messages="fc.$error">
<div ng-repeat="(name, message) in ::options.validation.messages"
ng-if="showError"
ng-message={{::name}}>{{message(fc.$viewValue, fc.$modelValue, this)}}
</div>
</div>
20 changes: 14 additions & 6 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var server = 'server';
Package.describe({
name: "mys:angular-formly-templates-material",
summary: "Material design templates for angular-formly",
version: "0.0.1",
version: "0.0.2",

documentation: 'README.md',
git: 'https://github.com/kamilkisiela/meteor-angular-formly-templates-material.git'
Expand All @@ -14,15 +14,15 @@ Package.describe({
Package.onUse(function (api) {

var packages = [
'standard-minifiers',
'es5-shim',
'ecmascript',
'standard-minifiers@1.0.2',
'es5-shim@4.1.14',
'ecmascript@0.1.6',
'[email protected]',
'angular:[email protected]',
'angular:[email protected]',
'angular:[email protected]',
'pbastowski:[email protected]',
'pbastowski:ecmascript-extras'
'pbastowski:ecmascript-extras@0.0.2'
];

api.versionsFrom("[email protected]");
Expand Down Expand Up @@ -54,7 +54,15 @@ Package.onUse(function (api) {

// input
'lib/client/types/input/input.js',
'lib/client/types/input/input.ng.html'
'lib/client/types/input/input.ng.html',

// checkbox
'lib/client/types/checkbox/checkbox.js',
'lib/client/types/checkbox/checkbox.ng.html',

// switch
'lib/client/types/switch/switch.js',
'lib/client/types/switch/switch.ng.html'

], client);

Expand Down

0 comments on commit 9a87657

Please sign in to comment.