Hacker News new | past | comments | ask | show | jobs | submit login

It looks like Angular on crack. I can see how this can quickly turn into unworkable mess.



I think Angular looks like Htmx on crack but I do remember that Angular was first.

We used it in a project and it worked perfectly. If you have the need to write a lot of logic and changing of most of the UI parts dynamically on the page then React/Vue/Svelte/Angular is better suited. If you on the other hand has page that could be server rendered and some parts or lists that should load new parts into the page this may be the easiest way to do that.

You can also combine it with any backend language instead of us having one framework for C#, one for Java, one for Go and so on. I think this is one of the biggest USPs for Htmx.


Not at all. What makes you think that it looks like Angular?


Angular 1, I don't know about Angular 2 had syntax like ng-repeat

   <a class="item" ng-repeat="action in activeField.actions" ng-click="follow(action, $index, $event)">
    {{action.text}}
    <i class="{{action.icon}} icon"></i>
   </a>


A syntax-based comparison feels a bit... superficial. One is an MVC based SPA framework. The other is best described (in my mind) as syntactic sugar over AJAX calls that replace inner HTMLs of selected targets.


Yeah, honestly (ignoring syntax) it looks A LOT like the original ROR ajax implementation. Having the server render a partial and swaping out the inner html to do a partial page update.


No - from my perspective - it's important and for understanding maintainability. The syntax helps understand the mechanism of using HTML directives that are picked up by clientside javascript at pageload or AJAX HTML partial replacement, which is what GP was getting at with its comparison to Angular 1. Angular 1 picks up directives the same way (and Knockout).

In react you don't use the mechanism of directives, you use JSX or React.createElement in standard Javascript statements or expressions.

I think it's important because it decides your templating and composition, which is what React solves with its Components.

I played with pjax which is similar.

EDIT: For example, you might not want ng-click in your HTML if you think that is wrong for example, as it's like DHTML and onclick="" (I don't have a perspective on this at this time)


There are a lot of frameworks/libraries/template-engines that use custom attributes and similar syntax and Angular definitely wasn't the first one.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: