Merge branch 'develop_v4' into 'develop_v4'

formcontrols

See merge request !251
parents 7153be9c 0c8ecfe0
import { NgRedux } from "@angular-redux/store"; import { NgRedux } from "@angular-redux/store";
import { Component, OnDestroy, OnInit } from "@angular/core"; import { Component, OnDestroy, OnInit } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { ActivatedRoute, Params, Router } from "@angular/router"; import { ActivatedRoute, Params, Router } from "@angular/router";
import { CookieService } from "ngx-cookie"; import { CookieService } from "ngx-cookie";
import { BehaviorSubject, Subscription } from "rxjs/Rx"; import { BehaviorSubject, Subscription } from "rxjs/Rx";
...@@ -17,7 +16,7 @@ import { IAppState } from "../store/store"; ...@@ -17,7 +16,7 @@ import { IAppState } from "../store/store";
selector: "home", selector: "home",
template: ` template: `
<div> <div>
<form [formGroup]="formGroup" method = "POST" action="{{apiEndPoint}}/oauth/login{{apiEndPointParams}}" #form> <form method = "POST" action="{{apiEndPoint}}/oauth/login{{apiEndPointParams}}" #form>
<!-- <input type="hidden" name="X-oauth-enabled" value="true"> --> <!-- <input type="hidden" name="X-oauth-enabled" value="true"> -->
<div class="bg-warning" style="padding: 2em;"> <div class="bg-warning" style="padding: 2em;">
...@@ -51,7 +50,7 @@ import { IAppState } from "../store/store"; ...@@ -51,7 +50,7 @@ import { IAppState } from "../store/store";
}) })
export default class Home implements OnInit, OnDestroy { export default class Home implements OnInit, OnDestroy {
private formGroup: FormGroup;
private authToken: string; private authToken: string;
private authRole: string; private authRole: string;
private name: any; private name: any;
...@@ -61,7 +60,7 @@ export default class Home implements OnInit, OnDestroy { ...@@ -61,7 +60,7 @@ export default class Home implements OnInit, OnDestroy {
private apiEndPointParams = API_ENDPOINT_PARAMS; private apiEndPointParams = API_ENDPOINT_PARAMS;
private loginInfoSub: Subscription; private loginInfoSub: Subscription;
constructor(private fb: FormBuilder, constructor(
private _ata: LoginInfoActions, private _ata: LoginInfoActions,
private _ngRedux: NgRedux<IAppState>, private _ngRedux: NgRedux<IAppState>,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
...@@ -72,8 +71,6 @@ export default class Home implements OnInit, OnDestroy { ...@@ -72,8 +71,6 @@ export default class Home implements OnInit, OnDestroy {
this.authToken = ""; this.authToken = "";
this.authRole = ""; this.authRole = "";
this.name = ""; this.name = "";
this.formGroup = this.fb.group({
});
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE); this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
}; };
......
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