Angular: File Upload, Links, and Caching?

It’s been a while since I’m written here, but I am learning Angular at the moment so I decided to share a bit of what I’m learning and some problems I’m running into.

What is Angular?

Angular is a framework downloaded through npm package manager where the roots of the programming languages in Angular consist of Javascript. In Angular, most of the programming languages used are TypeScript, HTML, and CSS.

Components

For the project I am working on right now, I am using components to practice good coding techniques to separate out each part of the website. Components help with decoding and can kind of work like how Object Oriented Programming in Java works.

However, despite knowing the gist of how components work, I don’t fully know how to connect components to each other. I know how to connect service files to component files when they are located inside the same folder in a directory, but once it is outside a directory, I am unsure how to utilize one component inside another.

File Uploads

In addition, I am currently working on file uploads and having the files convert to bit64 to save to a backend database. Thankfully in Angular, there are pre-made methods that can automatically save those files as bit64.

Links

I am also working on the same feature but for links. Links are generally more straightforward since they can just be saved as Strings, but the difficult part is distinguishing links and Strings and knowing which is valid or not valid URLs. To combat this, I created a pop-up that takes in a link that is saved as a String. The specific String saved in that pop-up form can be saved to a String variable called link and with that, it can clear some confusion for the database to distinguish normal Strings and a link.

Caching

There is one more thing to work on that I have not yet gotten to. That is caching. I’ve heard of the term caching and at my part-time job at my school, I often “flush the cache” when things are not working, but I do not exactly know what it does. So I’m going to look up some videos about it to figure that out.

Conclusion

Hopefully, I can upload another post on Monday, Dec. 4, 2023 to update everyone on what more I learned about Angular.


Discover more from Angela Cui

Subscribe to get the latest posts sent to your email. It’s FREE!