1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var core_1 = require("@angular/core");
|
4 | var forms_1 = require("@angular/forms");
|
5 | var ConfigAppConfigComponent = (function () {
|
6 | function ConfigAppConfigComponent(injector) {
|
7 | this.injector = injector;
|
8 | this.formGroup = new forms_1.FormGroup({ AppTitle: new forms_1.FormControl('', [forms_1.Validators.required]) });
|
9 | this.configChanged = new core_1.EventEmitter();
|
10 | this.configFormGroup = this.injector.get('configFormGroup');
|
11 | }
|
12 | Object.defineProperty(ConfigAppConfigComponent.prototype, "configFormGroup", {
|
13 | set: function (configFormGroup) {
|
14 | var _this = this;
|
15 | this.formGroup.patchValue(configFormGroup.value);
|
16 | configFormGroup.valueChanges.subscribe(function (data) {
|
17 | _this.formGroup.patchValue(data);
|
18 | });
|
19 | },
|
20 | enumerable: true,
|
21 | configurable: true
|
22 | });
|
23 | ConfigAppConfigComponent.decorators = [
|
24 | { type: core_1.Component, args: [{
|
25 | moduleId: module.id,
|
26 | selector: 'config-app-config',
|
27 | template: "<div [formGroup]=\"formGroup\"> <mat-form-field> <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"\u0646\u0627\u0645 \u067E\u0631\u0648\u0698\u0647\" formControlName=\"AppTitle\"> </mat-form-field> </div>"
|
28 | },] },
|
29 | ];
|
30 |
|
31 | ConfigAppConfigComponent.ctorParameters = function () { return [
|
32 | { type: core_1.Injector, },
|
33 | ]; };
|
34 | ConfigAppConfigComponent.propDecorators = {
|
35 | "configFormGroup": [{ type: core_1.Input },],
|
36 | "configChanged": [{ type: core_1.Output },],
|
37 | };
|
38 | return ConfigAppConfigComponent;
|
39 | }());
|
40 | exports.ConfigAppConfigComponent = ConfigAppConfigComponent;
|
41 |
|
\ | No newline at end of file |