3 ms·
Not at all. What makes you think that it looks like Angular?
by ris58h 3y ago
Not at all. What makes you think that it looks like Angular?
- samsquire 3y agoAngular 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>
- hliyan 3y agoA 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.
- itslennysfault 3y agoYeah, 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.
- samsquire 3y agoNo - 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)
- ris58h 3y agoThere are a lot of frameworks/libraries/template-engines that use custom attributes and similar syntax and Angular definitely wasn't the first one.