Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Bipon Biswas
Bipon Biswas

Posted on

     

Deploy your Angular app to GitHub pages directly

In this tutorial we’ll see how to host an Angular web application using Github Pages. Let’s get started.

Prerequisites
You need to have Node.js, NPM and Angular CLI installed, you also need to generate a new Angular project using Angular CLI.

Step 1:ng new child-demo in Visual Studio IDE terminal

Step 2: cd child-demo

Step 3: command follow step by step

- git init- git add .- git commit -m "first commit"- git remote add origin https://github.com/bipon68/child-demo.git (git remote add origin https://github.com/<username>/<repositoryname>.git)- git push -u origin master- npm install -g angular-cli-ghpages- ng build --prod --base-href="https://bipon68.github.io/child-demo/" (Note: copy all file in dist folder into child-demo project folder and paste(one level up)) ($ ng build --prod --base-href "https://<YOUR_GITHUB_USER-NAME>.github.io/<YOUR_REPO_NAME>/")- angular-cli-ghpages- Your project should be available at - https://<username>.github.io/<repositoryname> (Sample example : https://bipon68.github.io/child-demo/)
Enter fullscreen modeExit fullscreen mode

Reference
angular cli ghpages,Upload angular Project github Pages

Source Code
Github

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Front End Engineer at Pridesys IT Ltd, a Software company based in Dhaka, Bangladesh.
  • Location
    Dhaka, Bangladesh
  • Joined

More fromBipon Biswas

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp