Store in GIT
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var core_1 = require("@angular/core");
|
||||
var user_class_1 = require("../../../classes/user.class");
|
||||
var data_service_1 = require("./../../../services/data.service");
|
||||
var UserFormComponent = (function () {
|
||||
function UserFormComponent(data) {
|
||||
this.data = data;
|
||||
this.roles = ['Pilot', 'Student', 'Instructor'];
|
||||
this.model = new user_class_1.User(0, "", "", this.roles[0]);
|
||||
this.submitted = false;
|
||||
}
|
||||
UserFormComponent.prototype.onSubmit = function () {
|
||||
var _this = this;
|
||||
this.submitted = true;
|
||||
this.data.load().then(function () {
|
||||
_this.data.postUser(_this.model).subscribe(function (b) { return _this.temp = JSON.stringify(b); });
|
||||
});
|
||||
};
|
||||
return UserFormComponent;
|
||||
}());
|
||||
UserFormComponent = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'user-form',
|
||||
templateUrl: './user-form.component.html'
|
||||
}),
|
||||
__metadata("design:paramtypes", [data_service_1.DataService])
|
||||
], UserFormComponent);
|
||||
exports.UserFormComponent = UserFormComponent;
|
||||
//# sourceMappingURL=user-form.component.js.map
|
||||
Reference in New Issue
Block a user