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

Commit a57d0d2

Browse files
author
Kamil Kisiela
committed
Add md-chip with placeholder, secondary-placeholder, delete-button-label and delete-hint
1 parent 34c1164 commit a57d0d2

File tree

4 files changed

+46
-8
lines changed

4 files changed

+46
-8
lines changed

CHANGELOG.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [Unreleased]
6+
### Added
7+
- md-chip with placeholder, secondary-placeholder, delete-button-label and delete-hint
8+
59
## [0.3.0] - 2015-11-17
610
### Added
711
- datepicker with date range and filtering _(currently in angular-material 1.0_RC4)_
@@ -42,9 +46,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4246

4347
## 0.0.1 - 2015-11-06
4448

45-
[0.3.0]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.2.0...v0.3.0
46-
[0.2.0]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.1.0...v0.2.0
47-
[0.1.0]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.4...v0.1.0
48-
[0.0.4]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.3...v0.0.4
49-
[0.0.3]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.2...v0.0.3
50-
[0.0.2]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.1...v0.0.2
49+
[Unreleased]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.3.0...HEAD
50+
[0.3.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.2.0...v0.3.0
51+
[0.2.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.1.0...v0.2.0
52+
[0.1.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.4...v0.1.0
53+
[0.0.4]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.3...v0.0.4
54+
[0.0.3]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.2...v0.0.3
55+
[0.0.2]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.1...v0.0.2

lib/client/types/chips/chips.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
var {SetModule} = angular2now;
2+
3+
SetModule('formlyMaterial')
4+
.config((formlyConfigProvider, formlyMaterialProvider) => {
5+
6+
formlyConfigProvider.setType({
7+
name: 'chips',
8+
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/chips/chips.ng.html'),
9+
defaultOptions: {
10+
defaultValue: [],
11+
ngModelAttrs: {
12+
placeholder: {attribute: 'placeholder'},
13+
secondaryPlaceholder: {attribute: 'secondary-placeholder'},
14+
deleteButtonLabel: {attribute: 'delete-button-label'},
15+
deleteHint: {attribute: 'delete-hint'}
16+
}
17+
},
18+
apiCheck: (check) => ({
19+
templateOptions: {
20+
placeholder: check.string.optional,
21+
secondaryPlaceholder: check.string.optional,
22+
deleteButtonLabel: check.string.optional,
23+
deleteHint: check.string.optional
24+
}
25+
})
26+
});
27+
28+
});

lib/client/types/chips/chips.ng.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<md-chips ng-model="model[options.key]"></md-chips>

package.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Package.onUse(function (api) {
2222
'angular:[email protected]',
2323
'angular:[email protected]',
2424
'angular:[email protected]',
25-
'wieldo:angular-formly@7.3.2'
25+
'wieldo:angular-formly'
2626
]
2727
};
2828

@@ -88,7 +88,11 @@ Package.onUse(function (api) {
8888

8989
// datepicker
9090
'lib/client/types/datepicker/datepicker.js',
91-
'lib/client/types/datepicker/datepicker.ng.html'
91+
'lib/client/types/datepicker/datepicker.ng.html',
92+
93+
// chips
94+
'lib/client/types/chips/chips.js',
95+
'lib/client/types/chips/chips.ng.html'
9296

9397
], client);
9498

0 commit comments

Comments
 (0)