1

I'm new in Angular2. I've read a few things about deployment of ng2 apps.

1) I have installed latest beta version of angular-cli.

2) Then I've created a new project with angular-cli.

3) Then I've run ng build command and copied/pasted the content of dist folder on a new folder on my wamp server.

After I try to reach the url on my browser, having my server running I get the following state of the application.

"Loading..." and the app component never loads. No errors or anything ? Any ideas about what I'm doing wrong ?

5
  • 1
    There's an option to build to github pages, try using that option, github.com/angular/… The default build does not support regularly serving the files. Also, the cli is a work in progress and many features are broken or rewritten regularly. So it might be just a bug. If you can show more of your output I can try looking more into it, or open an issue on the repo. Commented Nov 29, 2016 at 9:05
  • I don't do anything special. The procedure I describe is pretty straightforward. I'm just trying to load a blank app which was build with the relevant cli command, produced with angular-cli on my localhost without ng serve. You can try to do it yourself as well. Commented Nov 29, 2016 at 9:09
  • I was asking for your output, because when I run it and throw it on my regular server it works. So I want to know what is different on your setup. Maybe is your XAMP not working right? try using the package nws Commented Nov 29, 2016 at 9:18
  • 1
    It seems like when I build it to github pages the produced dist folder is working properly on server. Thanks ! Is there any more consistent webpack where I can rely on for build future ng2 applications ? Commented Nov 29, 2016 at 9:22
  • Not at the moment that I know of. But the core maintainer is Filipe Silva and he's working a lot on it, he usually posts about progress on twitter twitter.com/filipematossilv Better support for dist and being able to work with existing applications, and systems different to webpack are currently in high priority. Commented Nov 29, 2016 at 9:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.