关于login页面的一些问题
来源:
ray34ray34
2016-11-17
首先的我的ionic版本是2.1.4
在login.html中,老师您写的input参数是 [{ngModel}]="user.username" , 我在网上看有的是这样写
<form [formGroup]="loginForm" (ngSubmit)="logForm()">
<ion-item>
<ion-label>Username</ion-label>
<ion-input type="text" formControlName="LoginID"></ion-input>
</ion-item>
</form>
我想问问,这种写法是什么方式,那种更好一些?
2. 关于button, 在教程里是<button block>登陆</button>, 但是现在不行,我需要改成这样<button ion-button full color="primary" (click)="login()">登陆</button>
这是因为版本的原因吗?还是我需要添加一些东西?
多谢老师,这几天看了教程,受益匪浅!
写回答
1回答
-
Parry
2016-11-19
第一个写法没有好坏之分,看你喜欢。
第二个应该的版本的问题。
00
相似问题