Hi, I would like to know if this is a good way to create a Login page. This is my code:
<ion-content>
<form (ngSubmit)="login(conversationId.value, userId)">
<ion-item>
<ion-label floating>Conversations Id</ion-label>
<ion-input type="text" #conversationId></ion-input>
</ion-item>
<ion-item>
<ion-label floating>User Id</ion-label>
<ion-input type="text" #userId></ion-input>
</ion-item>
<div padding>
<button block type="submit">join!</button>
</div>
</form>
</ion-content>
Here is my TypeScript:
import {Component} from '@angular/core';
import {NavController} from 'ionic-angular';
import {LoginService} from './login-service';
@Component({
templateUrl: 'build/pages/login/login.html',
providers: [LoginService]
})
export class LoginPage {
constructor(private loginService: LoginService) {
}
public login(conversationId: string, userId: string) {
this.loginService.login(conversationId, userId);
}
}
This works but Chrome gives me the following warning:
*It looks like you’re using the old forms module. This will be opt-in in the next RC, and
will eventually be removed in favor of the new forms module. For more information, see:
Forms Upcoming Change Proposal
Can you give me your inputs of how you use it?