Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script>
- <script>
- function clickLink() {
- $.ajax({
- type: "post",
- url: "http://localhost:4200/fromOtherApp",
- contentType: 'application/json; charset=utf-8',
- data: {
- user:{
- email:"test@test.com",
- name:"test",
- }
- },
- headers: {
- token: "testtesttesttesttesttoken"
- },
- success: function(data){
- if (data.success) {
- var w = window.open("about:blank");
- w.document.open();
- w.document.write(data);
- w.document.close();
- }
- }
- });
- };
- </script>
- </head>
- <body>
- <a href="#" onClick="clickLink()">新しいウィンドウで開く</a>
- </body>
- </html>
- const layoutRoutes: Routes = [
- .... ,
- .... ,
- {path: 'fromOtherApp', component: FromOtherComponent}
- ];
Add Comment
Please, Sign In to add comment