Reputation: 871
Is there a way to run the Angular 2 startup project https://github.com/angular/quickstart/blob/master/README.md without having to run NPM or Node? I don't mind using NPM to download the packages, but I don't want to have to run the server to run the project. Is there a way to separate the two?
I have spent about an hour looking for a reasonable answer and seem to come up short. Any help is greatly appreciated.
Upvotes: 0
Views: 1595
Reputation: 39278
If you are using WebStorm you don't need a server. Just right click index.html and select "Run index.html". It will then start its internal web server and load the app.
Other IDEs might also support this.
Upvotes: 1
Reputation: 176
You'll definitely need to run npm install
to download the dependencies. As for doing it without running the server, the application makes numerous XHR calls to be able to function and your browser might need special setup to do this. ie. In Chrome for OSX you'll need to launch Chrome through the terminal like this open /Applications/Google\ Chrome.app --args --allow-file-access-from-files
. You'll also need to use the typescript compiler by running it in in watch mode (using npm run tsc:w
) or by invoking it manually by running tsc
everytime you want to compile your changes.
Upvotes: 1