Guest User

Untitled

a guest
Apr 24th, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title></title>
  6. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script>
  7. <script>
  8. function clickLink() {
  9. $.ajax({
  10. type: "post",
  11. url: "http://localhost:4200/fromOtherApp",
  12. contentType: 'application/json; charset=utf-8',
  13. data: {
  14. user:{
  15. email:"test@test.com",
  16. name:"test",
  17. }
  18. },
  19. headers: {
  20. token: "testtesttesttesttesttoken"
  21. },
  22. success: function(data){
  23. if (data.success) {
  24. var w = window.open("about:blank");
  25. w.document.open();
  26. w.document.write(data);
  27. w.document.close();
  28. }
  29. }
  30. });
  31. };
  32.  
  33. </script>
  34. </head>
  35.  
  36. <body>
  37. <a href="#" onClick="clickLink()">新しいウィンドウで開く</a>
  38. </body>
  39. </html>
  40.  
  41. const layoutRoutes: Routes = [
  42. .... ,
  43. .... ,
  44. {path: 'fromOtherApp', component: FromOtherComponent}
  45. ];
Add Comment
Please, Sign In to add comment