This project was generated with Angular CLI version 8.3.19.
-
Run
ng serve
for a dev server. Navigate tohttp://localhost:4200/
. The app will automatically reload if you change any of the source files. -
Run
json-server -w db.json
for a db json db server. api server Navigate tohttp://localhost:3000/
.
- 請在
sign-up.component
建立表單 - 將
sign-up.component
組件放到app.component
組件當中使用 sign-up.component
組件中的表單有以下條件- 2 個表單群組
- 第一個群組包含:
- 姓名 - 必填
- 密碼 - 必填且最小必須輸入 10 個字元
- 第二個群組 - 在第一個群組驗證為正確後,才可出現
E-mail
- 必填且必須符合 email 格式檢查- 推薦人姓名
- 利用使用者輸入的關鍵字發送
http request
查詢拿到member
的名單,將前三個人,利用formArray
的方式render
出來,並且利用屬性isRequire
決定是否必填
- 利用使用者輸入的關鍵字發送
- 第一個群組包含:
- 1 個提交按鈕
- 提交動作:要在表單驗證為正確後,才可啟用點擊操作
- 按下後提交後,要 清空、重置 第二個表單群組內的資料
- 清空可參考
ReSet();
方法
- 清空可參考
- 2 個表單群組