Advertisement
Guest User

bootmodal

a guest
Dec 13th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. **************************html*****************
  2.  
  3. <div #myModal class="modal fade" tabindex="-1" role="dialog">
  4. <div class="modal-dialog" role="document">
  5. <div class="modal-content">
  6. <div class="modal-header">
  7. <img class="image-fluid" src="Assets/alert.png">
  8. <h5 class="modal-title" id="contentLabel">Issue with Login</h5>
  9. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  10. <span aria-hidden="true">&times;</span>
  11. </button>
  12. </div>
  13. <div class="modal-body">
  14. <div class="container-fluid">
  15. <div class="row">
  16. <div class="col-sm-12">
  17. <div class="modalWrapper">
  18. <form>
  19. <div class="form-group">
  20. <input type="text" class="form-control" id="formGroupExampleInput" placeholder="UserName">
  21. </div>
  22. <div class="form-group">
  23. <input type="password" class="form-control" id="formGroupExampleInput2" placeholder="Password">
  24. </div>
  25. </form>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="modal-footer">
  32. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37.  
  38.  
  39.  
  40. ************************************************************TS***************
  41.  
  42. import { Component, ViewChild } from '@angular/core';
  43. import { NgForm } from '@angular/forms';
  44.  
  45. @Component({
  46. selector: 'app-login',
  47. templateUrl: './login.component.html',
  48. styleUrls: ['./login.component.css']
  49. })
  50. export class LoginComponent {
  51.  
  52. @ViewChild('f') signupForm: NgForm;
  53. @ViewChild('myModal') myModal;
  54.  
  55. constructor() {}
  56.  
  57. ngOnInit() {
  58.  
  59. }
  60.  
  61. onSubmit() {
  62. this.myModal.nativeElement.className = 'modal fade show';
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement