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

Commit 673af7a

Browse files
author
Kamil Kisiela
committed
Add md-switch
1 parent 9006bf1 commit 673af7a

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
88

99
### Added
1010
- showError in Messages wrapper
11-
- checkbox with basic functionality
12-
- mdTheme to checkbox
11+
- md-checkbox
12+
- mdTheme to checkbox, switch
13+
- md-switch
1314

1415
## 0.0.1 -
1516

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,24 @@ angular.module('myAppName', [
2929

3030
# Components
3131

32+
_rest of angular-material directive in near future_
33+
3234
## Fields
3335

3436
- input
35-
- _rest fields in near future_
37+
- checkbox
3638

3739
## Wrappers
3840

3941
- mdInputContainer
4042
- label
4143
- ngMessages
4244

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

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>

package.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ Package.onUse(function (api) {
5858

5959
// checkbox
6060
'lib/client/types/checkbox/checkbox.js',
61-
'lib/client/types/checkbox/checkbox.ng.html'
61+
'lib/client/types/checkbox/checkbox.ng.html',
62+
63+
// switch
64+
'lib/client/types/switch/switch.js',
65+
'lib/client/types/switch/switch.ng.html'
6266

6367
], client);
6468

0 commit comments

Comments
 (0)