7

I love angular, a fucking hello world with a config file and some auth headers takes 2 fucking days to get done.

Comments
  • 2
    What? 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
  • 2
    @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.
  • 1
    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"
  • 1
    @IHateForALiving you just rename it to 'app/environment' to import environment same thing for everything else. It always starts with "app/"
  • 1
    @b2plane good to know, but NONE OF THE EXAMPLES I'VE SEEN HAD IT.
  • 1
    @IHateForALiving because the dumbass intellij/vscode auto imports using the dumbass /../../../.. syntax even for me so i have to manually recorrect it to app/
Add Comment