Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

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 ?

share|improve this question
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. – David Silva 18 hours ago
    
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. – Korte 18 hours ago
    
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 – David Silva 18 hours ago
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 ? – Korte 18 hours ago
    
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. – David Silva 18 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.