Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to start? #3

Closed
officerebel opened this issue Dec 18, 2016 · 21 comments
Closed

how to start? #3

officerebel opened this issue Dec 18, 2016 · 21 comments

Comments

@officerebel
Copy link

I have put credentials in firebase but how to get this angular running?

@cdeng
Copy link
Owner

cdeng commented Dec 18, 2016

Hello,

If you have followed the configuration instructions, then just start a web server from app directory and you should be all set.

Let me know if you have any further questions.

Thanks,
-Cheng

@officerebel
Copy link
Author

Hi thanx! Wich server? ng start worked.

npm install -g angular-cli

ng serve
open http://localhost:4200

also followed https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md but now it does not work anymore.
Can you help with the commands?
Tim

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

Hi Tim,
The only thing you have to do is launching a development web server. There are many ways to start a web server. Using "ng serve" as you mentioned is one of them. Here are some other ways to serving any directory - How to easily start a webserver in any folder? You don't have to follow that angularfire setup processes.
Thanks,
-Cheng

@officerebel
Copy link
Author

When i use ng serve I see "app works" but not the angular survey.

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

Well, you have to tweak a few things in order to use CLI tool for Angular. However, launching a web development server is the easiest way to run most JS apps from GitHub. I would suggest you to refer to this question and solution - How to easily start a webserver in any folder?. Besides that, if you are using a IDE (e.g. NetBeans, IntelliJ), they usually have a simple "Run Project" or "Run this Application" button that starts a web server automatically in one click.

@officerebel
Copy link
Author

officerebel commented Dec 20, 2016

Hi Thanx for your help but it does not work. Also put it in mamp and it does not work. Wich commands do you use?

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

What error messages are you getting?

I usually use "Run Project" function in IDEs for running these kinds of apps, but I am sure python -m SimpleHTTPServer 8000 will work if you have Python installed and running this command in the project directory.

@officerebel
Copy link
Author

I get a white screen

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

Did you see any error messages in console? Did you run the web server in the project directory?

@officerebel
Copy link
Author

127.0.0.1 - - [20/Dec/2016 22:40:06] "GET /app/js/directives.js HTTP/1.1" 200 -
in terminal I see

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

That's a good sign, but I would like you to look at the debugging console. Normally, you activate debugging in your browser with F12, and select "Console" in the debugger menu. Chrome would be best if you have it installed.

@officerebel
Copy link
Author

ncaught ReferenceError: angular is not defined
at main.js:10
angular.js:4640 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=myApp&p1=Error%3A%2…3A%2F%2Flocalhost%3A8000%2Fapp%2Flib%2Fangular%2Fangular.min.js%3A21%3A179)
at angular.js:38
at angular.js:4640
at q (angular.js:321)
at g (angular.js:4601)
at cb (angular.js:4523)
at c (angular.js:1758)
at Bc (angular.js:1779)
at fe (angular.js:1664)
at angular.js:31763
at HTMLDocument.b (angular.js:3207)

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

That doesn't make any sense. This project doesn't have the main.js file. What are you using for the web server? Are you pointing the web server at the right directory?

@officerebel
Copy link
Author

i wrote this code inside the directory. python -m SimpleHTTPServer 8000 how to put the web server to another directory?

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

Go to the directory you want and run the python simple http server from that directory.

@officerebel
Copy link
Author

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=myApp&p1=Error%3A%2…2F%2Flocalhost%3A8000%2Fapp%2F%2Flib%2Fangular%2Fangular.min.js%3A21%3A179)
at angular.js:38
at angular.js:4640
at q (angular.js:321)
at g (angular.js:4601)
at cb (angular.js:4523)
at c (angular.js:1758)
at Bc (angular.js:1779)
at fe (angular.js:1664)
at angular.js:31763
at HTMLDocument.b (angular.js:3207)

@cdeng
Copy link
Owner

cdeng commented Dec 20, 2016

Which file does this error complains about? It looks the same as the error you got last time. Make sure you are looking at the right directory.

@officerebel
Copy link
Author

it works ;-) thanx! any tips on how to upload to server with use of terminal commands after finished

@cdeng
Copy link
Owner

cdeng commented Dec 21, 2016

It depends on which host you'd like to use. I would suggest to start with free hosts like Firebase Hosting or GitHub Pages if you don't have a host.

@officerebel
Copy link
Author

officerebel commented Dec 23, 2016

great support Thanx! Ps where to edit the css?In main css or bootstrap theme?

@cdeng
Copy link
Owner

cdeng commented Dec 23, 2016

app/css/main.css

@cdeng cdeng closed this as completed Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants