Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
b2plane63951yWhat? Angular is THE easiest to setup that. I tried nextjs and its a nightmare to work with auth. In angular you have guards and interceptors. You only create 1 and reuse it for any route you want. Not even react or nextjs can be as simple as that
-
@b2plane spent the past 2 hours figuring out whether I should implement my own DataSource or I need to adapt whatever the stock one is for a table. Before that, I've spent 30 minutes figuring out why the theme I specifically imported isn't wprlomg (turns out, I need to include further CSS; IDK why I need to import a theme twice before it works). Before that I spent 2 hours to figure out how to use env variables (because no, I am not an animal and I will not import '../../../../../environments/environment.ts'), which for whatever reason can't be injected out of the box.
Turns out there's a package to handle .env variables, but you might want to encapsulate that in a service for testability and dependency injection... but of course you can't perform dependency injection when you're trying to DECLARE a component (eg: Auth0 initialization data, which comes from annotations), so I'm forced to litter process.env.SOMETHING all over the place until I can come up with a better idea for that. -
JFC that's the tutorial to have a datatable with server-side filtering.
https://blog.angular-university.io/...
IT IS LITERALLY 6 THOUSAND WORDS FOR A FUCKING HTTP REQUEST ON CLICK AND SOME NG-FOR IN A TABLE. HOW ON EARTH IS THIS SUPPOSED TO BE "ACCESSIBLE" -
b2plane63951y@IHateForALiving you just rename it to 'app/environment' to import environment same thing for everything else. It always starts with "app/"
-
b2plane63951y@IHateForALiving because the dumbass intellij/vscode auto imports using the dumbass /../../../.. syntax even for me so i have to manually recorrect it to app/
Related Rants
I love angular, a fucking hello world with a config file and some auth headers takes 2 fucking days to get done.
rant
angular