form tests

parent bb481be2
{"version":3,"sources":["webpack:///./source/components/lazy-load/lazy-load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAA0C;AAC1C,qCAAyC;AACzC,wCAAuD;AAMvD,KAAM,sBAAsB;KAA5B;KAA8B,CAAC;KAAD,6BAAC;AAAD,EAAC;AAAzB,uBAAsB;KAH3B,gBAAS,CAAC;SACT,QAAQ,EAAE,oCAAoC;MAC/C,CAAC;;IACI,sBAAsB,CAAG;AAE/B,KAAM,MAAM,GAAW;KACrB,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE;EACrD,CAAC;AAMF,KAAa,gBAAgB;KAA7B;KAAgC,CAAC;KAAD,uBAAC;AAAD,EAAC;AAApB,iBAAgB;KAJ5B,eAAQ,CAAC;SACR,OAAO,EAAE,CAAG,qBAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAE;SAC3C,YAAY,EAAE,CAAE,sBAAsB,CAAE;MACzC,CAAC;;IACW,gBAAgB,CAAI;AAApB,6CAAgB","file":"1.chunk.js","sourcesContent":["import { Component } from '@angular/core';\nimport { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\n\n@Component({\n template: `<H1>Lazy Loaded Component One</H1>`\n})\nclass LazyLoadedComponentOne {}\n\nconst routes: Routes = [\n { path: 'lazy1', component: LazyLoadedComponentOne },\n];\n\n@NgModule({\n imports: [ RouterModule.forChild(routes) ],\n declarations: [ LazyLoadedComponentOne ]\n})\nexport class LazyLoadedModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./~/angular2-router-loader/src!./~/tslint-loader!./source/components/lazy-load/lazy-load.ts"],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([1],{
/***/ 471:
/***/ function(module, exports, __webpack_require__) {
"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 = __webpack_require__(1);
var core_2 = __webpack_require__(1);
var router_1 = __webpack_require__(25);
var LazyLoadedComponentOne = (function () {
function LazyLoadedComponentOne() {
}
return LazyLoadedComponentOne;
}());
LazyLoadedComponentOne = __decorate([
core_1.Component({
template: "<H1>Lazy Loaded Component One</H1>"
}),
__metadata("design:paramtypes", [])
], LazyLoadedComponentOne);
var routes = [
{ path: 'lazy1', component: LazyLoadedComponentOne },
];
var LazyLoadedModule = (function () {
function LazyLoadedModule() {
}
return LazyLoadedModule;
}());
LazyLoadedModule = __decorate([
core_2.NgModule({
imports: [router_1.RouterModule.forChild(routes)],
declarations: [LazyLoadedComponentOne]
}),
__metadata("design:paramtypes", [])
], LazyLoadedModule);
exports.LazyLoadedModule = LazyLoadedModule;
/***/ }
});
//# sourceMappingURL=1.0a8829f62ba8a392b6db.bundle.js.map
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<!doctype html>
<html lang="en" data-framework="angular2">
<head>
<meta charset="utf-8">
<title>Angular 2 με Drupal backend RESTful server</title>
<link rel="stylesheet" href="https://bootswatch.com/paper/bootstrap.min.css">
</head>
<body>
<h3 class="text-center">Angular 2 με Drupal backend RESTful server</h3>
<hr/>
<div class="container-fluid">
<kitchen-sink></kitchen-sink>
</div>
<script type="text/javascript" src="/vendor.0a8829f62ba8a392b6db.bundle.js"></script><script type="text/javascript" src="/app.0a8829f62ba8a392b6db.bundle.js"></script></body>
</html>
This diff is collapsed.
This diff is collapsed.
......@@ -30,8 +30,8 @@ import {
</div>
<div class="form-group">
<label>Ημερομηνία Γέννησης</label>
<input type="date" [(ngModel)]="student.birthDate"
class="form-control" name="birthDate" />
<input type="date" [(ngModel)]="student.birthdate"
class="form-control" name="birthdate" />
</div>
<input type="submit" [disabled]="!studentform.valid" value="Υποβολή" class="btn btn-success" />
</form>
......@@ -43,7 +43,7 @@ export default class Form3 {
constructor(private http: Http) {
this.student = new Student(0,'','','','','1','');
this.student = new Student(0,'','','','','1');
}
onSubmit(studentform: any) {
......@@ -62,7 +62,7 @@ export default class Form3 {
"http:\/\/eepal.dev\/drupal\/rest\/relation\/student\/student\/revision_uid":[
{"href":"http:\/\/eepal.dev\/drupal\/user\/1?_format=hal_json"}
]
};
};
this.student.langcode = [
{"value":"en","lang":"en"}
];
......@@ -125,9 +125,10 @@ export default class Form3 {
];
let headers = {
"Authorization": "Basic cmVzdHVzZXI6czNjckV0MFAwdWwwJA==", // encoded user/pass - this is admin/123qwe
"Authorization": "Basic cmVzdHVzZXI6czNjcjN0b3BvdWxvcw==", // encoded user/pass - this is admin/123qwe
"Accept": "application/hal+json",
"Content-Type": "application/hal+json",
"X-CSRF-Token": "aAjJxSqCHxU6ticjobl1GVVM-sGh26MnYgQ7CwEGyEc"
"X-CSRF-Token": "N2tI55qa9gUDWJ_KXuZC1YL2Xb9Dt3pdGr2KkYGHKv0"
};
console.log(this.student);
......
......@@ -4,8 +4,7 @@ export class Student {
public name: string,
public surname: string,
public address: string,
public birthDate: string,
public studentclass_id:string,
public _links:string
public birthdate: string,
public studentclass_id:string
){}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment