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

Commit 0b7b5cc

Browse files
author
Kamil Kisiela
committed
Merge branch 'release/v0.6.0'
2 parents 3f5be21 + df52921 commit 0b7b5cc

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 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+
## [0.6.0] - 2015-11-27
6+
### Added
7+
- compatibility with Meteor releases lower then 1.2
8+
59
## [0.5.2] - 2015-11-19
610
### Fixed
711
- missing md-theme attribute when using templateOptions.theme
@@ -70,6 +74,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7074

7175
## 0.0.1 - 2015-11-06
7276

77+
[0.6.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.5.2...v0.6.0
7378
[0.5.2]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.5.1...v0.5.2
7479
[0.5.1]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.5.0...v0.5.1
7580
[0.5.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.4.0...v0.5.0

lib/client/formly-material.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function formlyMaterial() {
77
var self = this;
88

99
this.templateUrl = function (templateUrl) {
10-
return '/packages/wieldo:angular-formly-templates-material/' + templateUrl.replace(/^\//, "");
10+
return angularTemplateUrl('wieldo:angular-formly-templates-material', templateUrl);
1111
};
1212

1313
this.$get = function () {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<formly-transclude></formly-transclude>
22
<div ng-messages="fc.$error">
33
<div ng-repeat="(name, message) in ::options.validation.messages"
4-
ng-if="showError"
5-
ng-message={{::name}}>{{message(fc.$viewValue, fc.$modelValue, this)}}
4+
ng-message-exp="name">
5+
{{message(fc.$viewValue, fc.$modelValue, this)}}
66
</div>
77
</div>

package.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var client = 'client';
33
Package.describe({
44
name: "wieldo:angular-formly-templates-material",
55
summary: "Material design templates for angular-formly",
6-
version: "0.5.2",
6+
version: "0.6.0",
77

88
documentation: 'README.md',
99
git: 'https://github.com/wieldo/angular-formly-templates-material.git'
@@ -14,11 +14,13 @@ Package.onUse(function (api) {
1414
var packages = {
1515
use: [
1616
17+
1718
'pbastowski:[email protected]',
1819
'pbastowski:[email protected]',
1920
2021
],
2122
imply: [
23+
'mys:angular-template-url',
2224
'angular:[email protected]',
2325
'angular:[email protected]',
2426
'angular:[email protected]',
@@ -110,6 +112,7 @@ Package.onTest(function(api) {
110112
'velocity:helpers',
111113
'velocity:console-reporter',
112114
'jquery',
115+
'mys:version-compare',
113116
'angular:[email protected]',
114117
'wieldo:angular-formly-templates-material'
115118
]);

tests/client/formly-material-spec.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,48 @@ describe('formlyMaterial', () => {
44
//
55
let formlyMaterial;
66
let formlyMaterialPr;
7+
let prefix;
78

89
//
910
// tests
1011
//
11-
12+
1213
beforeEach(() => {
1314
angular.module('formlyMaterialMock', [])
1415
.config((formlyMaterialProvider) => {
1516
formlyMaterialPr = formlyMaterialProvider
1617
});
1718
module('formlyMaterial', 'formlyMaterialMock');
18-
19+
1920
angular.module('testApp', ['angular-meteor', 'formly', 'formlyMaterial', 'ngMock']);
2021
module('testApp');
2122

2223
inject(function ($templateCache, $httpBackend, _formlyMaterial_) {
2324
$httpBackend.whenGET(/\.html$/i).respond((method, url) => $templateCache.get(url));
2425
formlyMaterial = _formlyMaterial_;
2526
});
27+
28+
if (meteorVersionCompare.lt('1.2')) {
29+
prefix = "/packages/wieldo_angular-formly-templates-material_";
30+
} else {
31+
prefix = "/packages/wieldo:angular-formly-templates-material/";
32+
}
2633
});
2734

2835
it("should be injectable", () => {
2936
expect(formlyMaterial).toBeDefined();
3037
});
3138

3239
it("should be able to add prefix to templateUrl using factory", () => {
33-
const prefix = "/packages/wieldo:angular-formly-templates-material/";
34-
35-
expect(formlyMaterial.templateUrl("test.html")).toBe(prefix + "test.html");
36-
expect(formlyMaterial.templateUrl("/test.html")).toBe(prefix + "test.html");
37-
expect(formlyMaterial.templateUrl("/test/test.html")).toBe(prefix + "test/test.html");
40+
expect(formlyMaterial.templateUrl("client/test.html")).toBe(prefix + "client/test.html");
41+
expect(formlyMaterial.templateUrl("/client/test.html")).toBe(prefix + "client/test.html");
42+
expect(formlyMaterial.templateUrl("/client/test/test.html")).toBe(prefix + "client/test/test.html");
3843
});
3944

4045
it("should be able to add prefix to templateUrl using provider", () => {
41-
const prefix = "/packages/wieldo:angular-formly-templates-material/";
42-
43-
expect(formlyMaterialPr.templateUrl("test.html")).toBe(prefix + "test.html");
44-
expect(formlyMaterialPr.templateUrl("/test.html")).toBe(prefix + "test.html");
45-
expect(formlyMaterialPr.templateUrl("/test/test.html")).toBe(prefix + "test/test.html");
46+
expect(formlyMaterialPr.templateUrl("client/test.html")).toBe(prefix + "client/test.html");
47+
expect(formlyMaterialPr.templateUrl("/client/test.html")).toBe(prefix + "client/test.html");
48+
expect(formlyMaterialPr.templateUrl("/client/test/test.html")).toBe(prefix + "client/test/test.html");
4649
});
4750

4851
});

0 commit comments

Comments
 (0)