2017-08-10 476 views
-2
<p class="normal-gray-txt text-center"> 
    <b> 
    Choose reference 
    architecture 
    </b> 
</p> 
<form[formGroup=""]="custAppDetail" (ngSubmit="" 
fxLayout="column" > 
    <div fxLayout = "row" > 
    <label fxFlex="1 6 60%"> Architecture file source</label> 
    <md-select fxFlex = "3 1 40%" placeholder="abc" 
     formControlName="archFileSource" (ngModelChange="")="toNeoGit($event)"> 
     <md-option* ngFor = "let env of archFileSrc"[value=""] = "env.value" > 
     {{ env.viewValue }} 
     </md-option> 
    </md-select> 
    </div> 
    <div fxLayout = "row" > 
    <label fxFlex="1 6 60%"> Architecture file</label> 
    <md-select fxFlex = "3 1 40%" placeholder= "Choose file" formControlName= "archFile" >  
     <md - option * ngFor = "let env of ar"[value] = "env.value" > 
     { { env.viewValue } } 
     </md-option> 
    </md-select> 
    </div> 
    <div fxLayout = "row" > 
    <label fxFlex="1 6 60%"> Name</label> 
    <md-input fxFlex = "3 1 40%" type="text" placeholder="Enter Name" 
    formControlName="name"> 
    </md-input> 
    </div> 
    <div fxLayout = "row" > 
    <label fxFlex="1 6 60%"> Cloud</label> 
    <md-select fxFlex = "3 1 40%" placeholder="Choose Chain" 
    formControlName="chaintype" (ngModelChange="")="toEnv($event)"> 
     <md-option* ngFor = "let env of cl"[value=""] = "env.value" > 
     {{ env.viewValue }} 
     </md-option> 
    </md-select> 
    </div> 
    <div fxLayout = "row" > 
    <label fxFlex="1 6 60%"> Enviroment</label> 
    <md-select fxFlex = "3 1 40%" placeholder="Choose Environment" 
     formControlName="selEnv"> 
     <md-option* ngFor = "let env of enviroment"[value=""] = "env.value" > 
     {{ env.viewValue }} 
     </md-option> 
    </md-select> 
    </div> 
    <div class="box-btn-dialog" [hidden=""]="ftUser"> 
    <button md-raised-button="" class="auto-btn-prime" 
     disabled=""]="!custAppDetail.valid" type="submit">LAUNCH</button> 
    <button md-raised-button="" class="auto-btn-gray" md-dialog-close="cancel" 
    type="button">CANCEL</button> 
    </div> 
</form> 

對於第一行fxLayout =」 行」作品但不爲4的其餘部分行,我想要其餘的行被渲染爲第一行呈現任何幫助將不勝感激我使用「@角/芯」:「^ 2.4.3」,「@角/ flex-layout」:「 2.0.0-beta.1「, 而且md-select的高度不同於md-input如何使字段的高度相同fxLayout = 「行」 @角/柔性佈局 「: 」2.0.0-beta.1「 和角料2

+0

@ AJT_82,@的Pankaj Parkar,@ Nehal請UR寶貴意見 – Enthu

+0

@George亞歷山大能否請你幫我如何在HTML標記格式 – Enthu

+0

你看過[格式](https://stackoverflow.com /幫助/格式化)? –

回答

1

正如我在評論中提到的,有很多在您的html中出現錯誤代碼,例如* ngFormd-raised-button="",[hidden=""]="ftUser",disabled=""]="!custAppDetail.valid"。一旦你清理這些東西,代碼似乎工作正常。

HTML:

<p class="normal-gray-txt text-center"> 
    <b> 
    Choose reference 
    architecture 
    </b> 
</p> 
<form fxLayout="column" > 
    <div fxLayout = "row" class="row-height"> 
    <label fxFlex="1 6 60%"> Architecture file source</label> 
    <md-select fxFlex = "3 1 40%" placeholder="abc"> 
     <md-option *ngFor = "let env of [1, 2, 3, 4]" > 
     {{ env }} 
     </md-option> 
    </md-select> 
    </div> 
    <div fxLayout = "row" class="row-height"> 
    <label fxFlex="1 6 60%"> Architecture file</label> 
    <md-select fxFlex = "3 1 40%" placeholder= "Choose file">  
     <md-option *ngFor = "let env of [1, 2, 3, 4]" > 
     {{ env }} 
     </md-option> 
    </md-select> 
    </div> 
    <div fxLayout = "row" class="row-height"> 
    <label fxFlex="1 6 60%"> Name</label> 
    <md-input fxFlex = "3 1 40%" placeholder="Enter Name"> 
    </md-input> 
    </div> 
    <div fxLayout = "row" class="row-height"> 
    <label fxFlex="1 6 60%"> Cloud</label> 
    <md-select fxFlex = "3 1 40%" placeholder="Choose Chain"> 
     <md-option *ngFor = "let env of [1, 2, 3, 4]" > 
     {{ env }} 
     </md-option> 
    </md-select> 
    </div> 
    <div fxLayout = "row" class="row-height"> 
    <label fxFlex="1 6 60%"> Enviroment</label> 
    <md-select fxFlex = "3 1 40%" placeholder="Choose Environment"> 
     <md-option *ngFor = "let env of [1, 2, 3, 4]" > 
     {{ env }} 
     </md-option> 
    </md-select> 
    </div> 
    <div class="box-btn-dialog"> 
    <button md-raised-button class="auto-btn-prime">LAUNCH</button> 
    <button md-raised-button class="auto-btn-gray">CANCEL</button> 
    </div> 
</form> 

Plunker demo

要解決的輸入行高的問題,在組件的樣式添加這些CSS。

.row-height{ 
    min-height: 55px; 
} 

md-input{ 
    margin-top: -15px !important; 
} 
+0

我已經使用它,現在它的工作原理,不知道爲什麼它不工作,感謝您的幫助:) – Enthu