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

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: