0

I developed a simple angular project. by requesting to http://localhost:4200/?u=4, it returns a page that shows data for user with id of 4. Also in server side I have my user_id.

When I build my angular project, index page is something like below:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="utf-8">
    <title>Bisphone Campaign</title>
    <base href="/">

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="styles.dc2c24976210846778e8.css">
</head>
<body>
  <app-root></app-root>


  <script type="text/javascript" src="runtime.6afe30102d8fe7337431.js"></script><script type="text/javascript" src="polyfills.73a44a2a8ff085047495.js"></script><script type="text/javascript" src="main.8ca0b37d69dda2b321fe.js"></script>
</body></html>

My question is how to call index.html with this user_id. The desired system is a page that gets user_id and shows page like http://localhost:4200/?u=user_id

Mahmood Kohansal
  • 1,021
  • 2
  • 16
  • 42

1 Answers1

0

You can set your home page inside route list no need to call index file in your build. that all stuff will be loaded by Angular itself. please refer this link. See this or this one

Vijay Sankhat
  • 341
  • 3
  • 17
  • This comment helps me : At server side u don't need to call index page rather than call service call with given user id and you will get this user id at server side where you handle requset. – Mahmood Kohansal Jun 17 '18 at 05:39