Skip to content

Commit 517a819

Browse files
committed
Fix problems with ngModel 2-way data binding.
1 parent 9397c85 commit 517a819

File tree

7 files changed

+154
-114
lines changed

7 files changed

+154
-114
lines changed

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-json-schema-form",
3-
"version": "0.6.0-alpha.1",
3+
"version": "0.6.0-alpha.2",
44
"author": {
55
"name": "David Schnell-Davis",
66
"email": "[email protected]"
@@ -59,14 +59,14 @@
5959
"lodash": "4.x"
6060
},
6161
"peerDependencies": {
62-
"@angular/cdk": "2.x | 5.x",
63-
"@angular/common": "4.x | 5.x",
64-
"@angular/core": "4.x | 5.x",
65-
"@angular/flex-layout": "2.x | 5.x",
66-
"@angular/forms": "4.x | 5.x",
67-
"@angular/material": "2.x | 5.x",
68-
"@angular/platform-browser": "4.x | 5.x",
69-
"rxjs": "5.x"
62+
"@angular/cdk": ">=2.0.0",
63+
"@angular/common": ">=4.0.0",
64+
"@angular/core": ">=4.0.0",
65+
"@angular/flex-layout": ">=2.0.0",
66+
"@angular/forms": ">=4.0.0",
67+
"@angular/material": ">=2.0.0",
68+
"@angular/platform-browser": ">=4.0.0",
69+
"rxjs": ">=5.0.0"
7070
},
7171
"devDependencies": {
7272
"@angular/animations": "^5.0.1",
@@ -85,9 +85,9 @@
8585
"@angular/platform-browser-dynamic": "^5.0.1",
8686
"@angular/router": "^5.0.1",
8787
"@types/ace": "^0.0.35",
88-
"@types/jasmine": "^2.6.3",
88+
"@types/jasmine": "^2.8.0",
8989
"@types/jasminewd2": "~2.0.2",
90-
"@types/node": "^8.0.50",
90+
"@types/node": "^8.0.52",
9191
"brace": "^0.10.0",
9292
"camelcase": "^4.0.0",
9393
"codelyzer": "^4.0.1",
@@ -105,7 +105,7 @@
105105
"karma-jasmine-html-reporter": "^0.2.2",
106106
"protractor": "^5.2.0",
107107
"rimraf": "^2.6.1",
108-
"rollup": "^0.51.2",
108+
"rollup": "^0.51.5",
109109
"rollup-plugin-commonjs": "^8.2.6",
110110
"rollup-plugin-node-resolve": "^3.0.0",
111111
"rollup-plugin-node-resolve-angular": "^2.0.3",

src/lib/src/framework-library/framework-library.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class FrameworkLibraryService {
6262
stylesheets: (HTMLStyleElement|HTMLLinkElement)[];
6363
scripts: HTMLScriptElement[];
6464
loadExternalAssets = false;
65-
defaultFramework = 'material-design';
65+
defaultFramework = 'no-framework';
6666
frameworkLibrary: FrameworkLibrary = {
6767
'no-framework': {
6868
framework: NoFrameworkComponent

src/lib/src/framework-library/material-design-framework/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { MaterialTextareaComponent } from './material-textarea.component';
2020

2121
import { MaterialDesignFrameworkComponent } from './material-design-framework.component';
2222

23-
export const MATERIAL_DESIGN_COMPONENTS = [
23+
export const MATERIAL_FRAMEWORK_COMPONENTS = [
2424
FlexLayoutRootComponent, FlexLayoutSectionComponent,
2525
MaterialAddReferenceComponent, MaterialOneOfComponent,
2626
MaterialButtonComponent, MaterialButtonGroupComponent,
Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4-
import { FlexLayoutModule } from '@angular/flex-layout';
54
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5+
import { FlexLayoutModule } from '@angular/flex-layout';
66
import {
77
MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule,
88
MatDatepickerModule, MatFormFieldModule, MatGridListModule, MatIconModule,
99
MatInputModule, MatNativeDateModule, MatRadioModule, MatSelectModule,
1010
MatSliderModule, MatSlideToggleModule, MatTabsModule, MatTooltipModule,
1111
} from '@angular/material';
12+
export const ANGULAR_MATERIAL_MODULES = [
13+
MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule,
14+
MatDatepickerModule, MatFormFieldModule, MatGridListModule, MatIconModule,
15+
MatInputModule, MatNativeDateModule, MatRadioModule, MatSelectModule,
16+
MatSliderModule, MatSlideToggleModule, MatTabsModule, MatTooltipModule,
17+
];
1218
/**
1319
* unused @angular/material modules:
1420
* MatAutocompleteModule, MatChipsModule, MatDialogModule, MatExpansionModule,
@@ -20,20 +26,19 @@ import {
2026
import { WidgetLibraryModule } from '../../widget-library/widget-library.module';
2127
import { JsonSchemaFormService } from '../../json-schema-form.service';
2228

23-
import { MATERIAL_DESIGN_COMPONENTS } from './index';
29+
import { MATERIAL_FRAMEWORK_COMPONENTS } from './index';
2430

2531
@NgModule({
2632
imports: [
27-
CommonModule, FlexLayoutModule, FormsModule, ReactiveFormsModule,
28-
MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule,
29-
MatDatepickerModule, MatFormFieldModule, MatGridListModule, MatIconModule,
30-
MatInputModule, MatNativeDateModule, MatRadioModule, MatSelectModule,
31-
MatSliderModule, MatSlideToggleModule, MatTabsModule, MatTooltipModule,
32-
WidgetLibraryModule
33+
CommonModule, BrowserAnimationsModule, FormsModule, ReactiveFormsModule,
34+
FlexLayoutModule, ...ANGULAR_MATERIAL_MODULES, WidgetLibraryModule
35+
],
36+
declarations: [ ...MATERIAL_FRAMEWORK_COMPONENTS ],
37+
exports: [
38+
...MATERIAL_FRAMEWORK_COMPONENTS, ...ANGULAR_MATERIAL_MODULES,
39+
BrowserAnimationsModule, FlexLayoutModule
3340
],
34-
declarations: [ ...MATERIAL_DESIGN_COMPONENTS ],
35-
exports: [ ...MATERIAL_DESIGN_COMPONENTS ],
36-
entryComponents: [ ...MATERIAL_DESIGN_COMPONENTS ],
41+
entryComponents: [ ...MATERIAL_FRAMEWORK_COMPONENTS ],
3742
providers: [ JsonSchemaFormService ]
3843
})
3944
export class MaterialDesignFrameworkModule { }

0 commit comments

Comments
 (0)