-2

I have created a HTML and corresponding .js files seperately.

Now, what I require is to load them in my existing angular project, so that for example, I can open the new HTML and .js as:

localhost:portnumber/HTML file name - or something similar

I have learned over internet to mention the js file in angular.json, but what about the html file ? How do I load it? Can someone please help?

  • Are you asking how to serve an HTML document with some JS that have nothing Angular related in them at all from the Angular dev server? – Quentin Feb 04 '20 at 11:19
  • @Quentin yes absolutely – rahul mukherjee Feb 04 '20 at 11:23
  • Sounds like something better handled by deploying everything to a non-development server. – Quentin Feb 04 '20 at 11:24
  • @Quentin Not sure what you last comment means, however, I have come accross this link: https://stackoverflow.com/questions/53416871/routing-to-static-html-page-in-angular-6 And have done these changes: "src/all.html", { "glob": "all.html", "input": "src/", "output": "/home/" } in angular.json. But not sure how to fire up the final url. – rahul mukherjee Feb 04 '20 at 11:28

1 Answers1

0

I have solved it by adding glob in angular.json - just in case anyone needs for future reference.