re: Learning Angular 5 as a React and Vue Developer VIEW POST

VIEW FULL DISCUSSION

there is still a separation of concerns for HTML and JS code in Angular, especially in comparison to the React architecture.

Seriously? I thought that this one had been laid to rest years ago. It seems not.

Okay, try this little experiment for me: go into your HTML file and change (click)="toggleSearch()" to (click)="toggleSearchNew()", then run your app again. What happens? Nothing, right? Or you get an error of some kind? That's because the toggleSearchNew method doesn't exist in your ResourcesComponent class. You need to open your JS (or TS) file and add it there.

And this will be the case most of the time: every time you change your markup file, you'll have to make a corresponding change in your JavaScript/Typescript, and vice versa. Sound like separation of concerns to you? To me it looks like those files are joined at the hip!

And really, that's always been the case. What devs have referred to as "separation of concerns" actually meant separation of files and of technologies. The HTML and JS has always been completely interdependent, which ever framework du jour you happened to be using. JSX simply makes explicit what we've all really been doing all along.

code of conduct - report abuse