Git Product home page Git Product logo

Comments (4)

RobertDyball avatar RobertDyball commented on May 30, 2024

Hi Ian,
sorry didn't get to your issue earlier; would I be correct in assuming you are using ng to serve up your site from "ng serve --port 5000" below ... hence the line in error saying:
Evaluating http://localhost:5000/wwwroot/app

this project instead needs to be served through Kestrel or IIS/PWS. I'm making use of the ASP.Net Core templates with some modifications to serve the angular SPA. I have kept many of the page names, just for familiarity.

index.html is a hangover from the original ng code, the work it does in a flat-file based traditional setup gets split between index.cshtml, app.cshtml and_layout.cshtml- this allows server side code to be executed and served up to the client.

Have a look in the branch Angular5
https://github.com/RobertDyball/A2SPA/tree/Angular5
as this is using Angular 5.2.x and .Net core 2.x

or a more recent version (a bit rough) where I'm switching to ngx-bootstrap, the branch is here:
https://github.com/RobertDyball/A2SPA/tree/ngx-bootstrap

If I have this wrong, please PM me a zipped up copy of your code, you can reach me at robert.dyball at gmail dot com

from a2spa.

Xoadra avatar Xoadra commented on May 30, 2024

No problem!

I'm actually not, since running my dotnet server also uses that port so it wouldn't work. I did try serving it up from its default port at 4200 but unsurprisingly that didn't work either. Then again I don't know if that means of linking the two separate frameworks would be a wise or even workable solution when it comes time for production and deployment.

So I did notice you had settings in some projects whereby you had additional settings configured in your Program.cs and Startup.cs files. I've given those a shot as well but I was still unable to get the original AppComponent template app.component.html to appear. I will take a loot at some of the earlier commits in both of those branches to see if any of the solutions there resolve the issue I'm currently wrestling with.

I'll also send you a copy of my most up-to-date version so hopefully that helps!

from a2spa.

RobertDyball avatar RobertDyball commented on May 30, 2024

from a2spa.

Xoadra avatar Xoadra commented on May 30, 2024

My original issue was ultimately resolved so I suppose there's no reason to keep this up anymore. Thanks for your help!

from a2spa.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.