React to Angular pt. 1

John Souza
2 min readNov 2, 2020

The Beginning of My New Tech Journey

Coming out of a coding bootcamp, you’re met with a host of languages, technologies, and software terms that seem overwhelming. It’s truly amazing to see how far I’ve grown already. I’ve studied serverless hosting options, functional programming, Python/Flask, and other options. My next journey is to learn Angular, a very popular frontend Javascript (well, Typescript, actually) framework.

The simplest building block in Angular is a component, which is broken up into three files. This will rub against some the mindset of React users, because React components are made up of only one file. Each Angular component is made up of its own html, css, and typescript file. The typescript file contains the logic and handles the state of the component, while the html file receives data from that typescript file via handlebars. The css file, of course, merely styles the html.

I recently polled some developers on a slack channel who have worked across different frontend frameworks, and this file structure came up as one of the more controversial parts of the framework. Personally, I love the enhanced organization. I hate it when files get too big. I’ve seen CSS files that are used for the entire project that take up hundreds of lines of code, and React components that do the same. So for me, I long for that type of structure.

An angular app can be started the same way a React app can be started via Create-React-App. You can first install the angular cli npm package using the command ‘npm install -g @angular/cli’ (this will globally install the angular cli on your computer, so you only have to do it once). Then you can use the ng generators in your cli. ‘ng new my-app’ will generate a new angular application for you, with all of the angular bootstrap built in. To run that file on your local machine, cd into the base angular directory and run ‘ng serve— open’. This will get you started with Angular.

As I continue to learn the framework, I hope to write a series of blog posts that goes deeper into my learnings. I look forward to sharing them all with you.

--

--