Reputation: 590
Can anyone please help me on running someone's code that I downloaded from Github in Visual Studio code
Upvotes: 5
Views: 33968
Reputation: 2454
You can directly run Angular GitHub projects without downloading on Stackblitz. Just replace the GitHub URL with the Stackblitz URL. Replace https://github.com/ with https://stackblitz.com/github/.
Example:
Or run an Angular project downloaded from GitHub on your computer.
Note: You must have NodeJS and angular-cli installed on your computer.
Go into your downloaded folder, open a command prompt and run npm install
. After it completes, run ng serve --open
and your project will automatically open in your browser.
Upvotes: 9
Reputation: 3745
Open Visual code
ng new notepad
npm install -g @angular/cli in the Visual Code
cd notepad
ng serve --open
git remote add origin https://github.com/OWNER/notepad.git
git remote -v
origin https://github.com/OWNER/REPOSITORY.git (fetch)
origin https://github.com/OWNER/REPOSITORY.git (push)
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Upvotes: 1
Reputation: 1
If it shows an error as
Could not find module "@angular-devkit/build-angular"
Apply command
npm install --save-dev @angular-devkit/build-angular
to fix it.
Upvotes: -1
Reputation: 109
my-app
.Open Powershel/Open Window Here
on the popup Menunpm install
or npm i
ng serve
or ng serve -open
or ng serve -o
Upvotes: 1
Reputation:
Try it
npm install
commandng serve
commandUpvotes: 8