|
I need to code Angular but I'm not very good at it, can anyone help with this. The situation is that I have this component that manages a fairly complicated view. It already does a lot of view-related things, and I can't really break it up into any smaller pieces. Problem is, that in order to use this view, I need to make 3 or 4 separate api calls and bang that data together to get anything useful. Right now, all this logic is in one service that both makes the actual api calls and then processes the data. This file is getting bigger than I would like, and it feels really tightly coupled with the view component. I'm not sure how to refactor anything though. Ultimately I would probably like to have a thin service without any logic that contains all the api calls, but I'm not sure where to put the rest of my code. Should I make a second service that calls the first one? Or should I make a separate component that processes the data and has the view component as a child? In React, the stateful vs pure component separation feels easier to reason with but like I said, I'm bad at Angular.
|
# ¿ Dec 3, 2018 16:22 |
|
|
# ¿ May 21, 2024 07:00 |
|
HaB posted:I haven't seen your code, but I already disagree with the bolded part. It's Angular, should be the latest version. I spent few hours refactoring my code by moving all the logic into a separate component and pushing data to the other component with @input hooks. It feels simple enough but I guess I need to show it to somebody and see if they can understand it.
|
# ¿ Dec 3, 2018 20:53 |
|
I haven’t used Vue but I heavily dislike the Angular templates because a) I keep forgetting the syntax while JSX is just Javascript so I already know it b) there’s no linting for the template directives and simple mistakes inside the template file can be really hard to find because Angular error messages suck
|
# ¿ Jul 12, 2019 19:15 |
|
Github Packages looks pretty promising, but there will so much loud screaming about Microsoft if it starts catching on
|
# ¿ Aug 21, 2019 18:13 |
|
Is it just me or are all JS build tools garbage? I decided to try Parcel because someone told me that it’s the new hotness and it just works without any config. Everything indeed worked initially but when I wanted to add Tailwind it just fails to work without any errors. Parcel, Postcss and Tailwind all have a documentation about how to make them them work with each other and it feels I’ve tried everything but again, debugging this poo poo is hard when there’s no error messages. Btw I didn’t really post this as a plea for help, I’ll figure it out later or just go back to webpack. It’s just annoying since I wanted to build the loving web page instead of toying with config files. Edit: solved by linking the css from js instead of html, no idea why Obfuscation fucked around with this message at 11:35 on Jan 28, 2020 |
# ¿ Jan 28, 2020 10:33 |
|
Are there any simple and straightforward tools that convert markdown into static html files? Preferably node-based. This is for a personal toy project so I might as well reinvent the wheel here because I need a fairly limited feature set, but if there’s an existing solution I’d rather use that. edit: I think I'll use PostHTML Obfuscation fucked around with this message at 12:47 on May 25, 2020 |
# ¿ May 25, 2020 09:35 |
|
I couldn’t survive a single day at work without MDN so I hope that it can be saved somehow
|
# ¿ Aug 13, 2020 14:32 |
|
You can iterate through the values of a string enum but not union types, so that's one thing that they have going for them
|
# ¿ Oct 16, 2021 04:46 |
|
bvj191jgl7bBsqF5m posted:We all agree that Angular sucks God I hate Angular, I spent the entire day today figuring out this poo poo which obviously isn't documented anywhere and produces totally incomprehensible error messages. How can it be so loving hard to make a dynamic form that is configurable at runtime? Isn't that why we have all this frontend poo poo in the first place? And let's not even talk about splitting a form in two or more components, I don't even know if that is theoretically possible. Angular is just a horrid pile of complexity piled on top of complexity, and there's no reward to any of it.
|
# ¿ Sep 15, 2022 19:44 |
|
React documentation also tells you to use Next and create-react-app isn't updated anymore. I guess you can just set up a new node project with your favorite bundler but that's probably too many fiddly bits to include in the official documentation.
|
# ¿ Dec 4, 2023 16:04 |
|
|
# ¿ May 21, 2024 07:00 |
|
Tailwind is certainly fine but if you want to put the least amount of effort into css and still have something that looks good I'd use some CSS library that comes with premade components, like Bootstrap or Fomantic UI
|
# ¿ Jan 29, 2024 17:20 |