Тёмный

How to fix Angular route path not working for direct URL when deployed to production | Angular | LSC 

Learn Smart Coding
Подписаться 3,1 тыс.
Просмотров 13 тыс.
50% 1

Hi Everyone,
In this video, we will see How to fix the Angular route path not working for direct URLs when deployed to production.
API Repo URL: github.com/learnsmartcoding/a...
file path: github.com/learnsmartcoding/a...
Please post your questions in the comment section and I will be happy to answer your questions.
Subscribe for more useful videos just like this: / @learnsmartcoding
Happy coding!

Опубликовано:

 

10 янв 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@shaunvonermirzo7581
@shaunvonermirzo7581 7 месяцев назад
short and straight to point, thanks!
@user-hd5vo6ki6q
@user-hd5vo6ki6q Год назад
Helped me out here - appreciate it!
@meetpadhiyar
@meetpadhiyar 9 месяцев назад
Thank you for providing valuable content. It has been a significant time-saver and has spared me the effort of searching extensively for accurate solutions. Despite my best efforts, I was unable to find the precise answers on my own.
@learnsmartcoding
@learnsmartcoding 9 месяцев назад
Glad it was helpful!
@fonsusproguer
@fonsusproguer 2 месяца назад
Funciona !!! Gracias 😎👌. Para algunos es necesario instalar URL Rewrite para IIS
@learnsmartcoding
@learnsmartcoding 2 месяца назад
Thank you for the note. Yes, you need to install URL Rewrite for IIS if not installed already.
@umeshshelke725
@umeshshelke725 Год назад
Great content. 👏 Please make video on token base session warning timeout pop-up when user is idle. Thanks 🙏
@zaidalbaik8217
@zaidalbaik8217 3 месяца назад
thank you
@seanj2
@seanj2 11 месяцев назад
This worked for me, but only when I directly placed in 'web.config' file inside the deployment directory on the web server.
@learnsmartcoding
@learnsmartcoding 11 месяцев назад
I am glad to hear this. You don't need to copy manually. In the angular.json file, just add the web.config after the assert. When building, it will be copied to deployment files
@legrandtalk
@legrandtalk 4 дня назад
You have the solution in linux azure app service ? cause we don't have iis serveur but nginx
@learnsmartcoding
@learnsmartcoding 4 дня назад
Try this solution if your app is deployed on Linux box learnsmartcoding.com/angular/solving-angular-app-routing-issue-linux-server-apache/ hope this will help you.
@thorenjp
@thorenjp 4 месяца назад
Im getting this error while running ''npm run build "css exceeded maximum budget. Budget 4.00 kB was not met by 40.88 kB with a total of 44.88 kB. Please give any solutions..
@learnsmartcoding
@learnsmartcoding 4 месяца назад
Hello, You can solve this by increasing the limit in angular.json file. Here is an example link, you can increase to more than your build size. Remember, you got this error as your overall bundling size is more than default for your project. github.com/learnsmartcoding/lsc-restaurant-table-booking-app/blob/main/angular.json#L40 Let me know if you have any other questions. Don't forget to subscribe if you haven't ! Happy coding!
@santoshjena1153
@santoshjena1153 3 месяца назад
in my case it is not working I added web.config file , locallay it is working but in live server it is not working
@learnsmartcoding
@learnsmartcoding 3 месяца назад
Hi santosh, is your app deployed to windows or Linux server? This video is gor windows server for iis. Happy coding!
@learnsmartcoding
@learnsmartcoding 3 месяца назад
Try this solution if your app is deployed on Linux box learnsmartcoding.com/angular/solving-angular-app-routing-issue-linux-server-apache/ hope this will help you.
@159binny
@159binny Год назад
Not working on github-pages
@learnsmartcoding
@learnsmartcoding Год назад
Hi Binny, Could you please explain a bit more on what is not working so that I can help you solve. Thanks.
@learnsmartcoding
@learnsmartcoding Год назад
Hi Binny, The solution I showed works only for Windows Server, IIS. For Linux, you need to modify on .htaccess file. Here is the post for the issue. learnsmartcoding.com/angular/solving-angular-app-routing-issue-linux-server-apache/ Hope this helps you.
@wakeuptamizha4503
@wakeuptamizha4503 Год назад
not working for me :(
@learnsmartcoding
@learnsmartcoding Год назад
Hi , you should place the web.config file with the content I provided to your deployed folder. It will work for sure. Please verify web.config file is present
@learnsmartcoding
@learnsmartcoding Год назад
Hi , The solution I have explained will definitely work as I have personally implemented in my projects and also, I showed a live demo. Please check the below t make sure we are doing it correctly. 1. Take the file from here github.com/learnsmartcoding/angular-beginners-course-shopping-app/blob/main/src/web.config 2. Place this in src folder in your project and add this in angular.json (here you should include in right place, not in test project) 3. run this command in local "npm run --prod" once the dist folder is created, check web.config file is present in the final build content. If it is there then the web.config file will be deployed as well and it will work. Please mention where are you deploying your application and did you restart website after deploying? Thanks, Karthik
@learnsmartcoding
@learnsmartcoding Год назад
Hi Wakeup Tamizha, The solution I showed works only for Windows Server, IIS. For Linux, you need to modify on .htaccess file. Here is the post for the issue. learnsmartcoding.com/angular/solving-angular-app-routing-issue-linux-server-apache/ Hope this helps you.
@khalidking3394
@khalidking3394 Год назад
it didnt work , i'm using apache web server in linux.
@learnsmartcoding
@learnsmartcoding Год назад
Hi Khalid, The solution I showed works only for Windows Server, IIS. For Linux, you need to modify on .htaccess file. Here is the post for the issue. learnsmartcoding.com/angular/solving-angular-app-routing-issue-linux-server-apache/ Hope this helps you.
@khalidking3394
@khalidking3394 Год назад
@@learnsmartcoding Thanks i will try this, I appreciate your help 🙏
@kritikumari5599
@kritikumari5599 8 месяцев назад
still not working
@learnsmartcoding
@learnsmartcoding 8 месяцев назад
Hi Kriti, is your angular app deployed in Windows server or Linux? This solution works for Windows, and for Linux, the setup to resolve this issue is different.
@playatanu
@playatanu Год назад
not works
@learnsmartcoding
@learnsmartcoding Год назад
Hi Playatanu, did you follow the steps and use the web.config mentioned in this demo? It should work. Thanks, learnsmartcoding
@playatanu
@playatanu Год назад
Your method only work for microsoft iis servers
@learnsmartcoding
@learnsmartcoding Год назад
So, are you trying with the Linux server? If so, the concept is the same, the incoming request should be routed to index.html, and rest angular routing will take care
@playatanu
@playatanu Год назад
Yes
@learnsmartcoding
@learnsmartcoding Год назад
@@playatanu The solution I showed works only for Windows Server, IIS. For Linux, you need to modify on .htaccess file. Here is the post for the issue. learnsmartcoding.com/angular/solving-angular-app-routing-issue-linux-server-apache/ Hope this helps you.
Далее
How to fix Routing Issues in Angular after deploying
5:33
Дима сделал мне сюрприз!😭
01:01
Просмотров 792 тыс.
Dockerize an Angular Application using Nginx
56:41
Просмотров 15 тыс.
Learn React Hooks: useCallback - Simply Explained!
17:15
Git MERGE vs REBASE
16:12
Просмотров 1 млн
Routing and Lazy Loading with Standalone Components
11:07
Angular Fundamentals, Undestand Angular Architecture
1:11:19