Install bootstrap for your project
npm install bootstrap@3
Goto angular.json, file and add the below code
npm install bootstrap@3
angular.json
"styles": [
{
"input": "./node_modules/bootstrap/dist/css/bootstrap.min.css"
},
"src/styles.css"
],
.html changes
<div class="container">
<form #fromlogin>
<h2>Login Page </h2>
<div class="form-group" ng-class="{ 'has-error' : true }">
<label class="control-Label" for="Name" >Username</label>
<div>
<input class="form-control" name="Name" type="text" required >
<span *ngIf="true" class="text-danger" >Name Required</span>
</div>
</div>
<div class="form-group">
<label class="control-Label" for="Pwd">Password</label>
<div>
<input class="form-control" name="Pwd" type="password" required>
<span *ngIf="true" class="text-danger">Password Required</span>
</div>
</div>
<div class="form-group">
<button class="btn btn -block btn-primary">Login</button>
</div>
</form>
</div>
ScreenShot
angularmodule.ts
index.html
Output
No comments:
Post a Comment
Thank you for visiting my blog