I have my Angular project pushed to github and linked that github repo to my netlify account for continous deployment. But when I open the link to my homepage I see a message from netlify that the link is broken.
Here click on "Build & deploy" and enter the build command npm run build
(npm install is automatically run by netlify). And also change the build directory. Netlify automatically only has dist/ set as dist folder, but Angular projects get build in the folder build/<project name>
, not dist/
CodePudding user response:
You should also include _redirects
file in your root folder to allow routing in you application.
Then, include the file to your assets in angular.json
as such:
"assets": [
"src/assets",
]
Inside the file, include this:
/* /index.html 200