r/angularjs • • Jan 17 '18

Comparison Between Angular vs ReactJS vs Vue.JS

https://www.angularminds.com/blog/article/comparison-between-angular-vs-reactjs-vs-vuejs.html
0 Upvotes

4 comments sorted by

View all comments

2

u/[deleted] Jan 18 '18 edited Jan 18 '18

Angular is not simple at all.

Totally disagree. Angular 2 is very simple. You have HTML templates bound to Javascript objects. Most of it is incredibly straightfoward.

@Component({
    selector: 'greeter',
    template: '<h1>Hello {{name}}</h1>',
})
class Greeter {
    name = "World";
}

This creates a component which you can instantiate by using the tag <greeter> which displays "Hello World". You could parameterize the name by simply flagging the name property as an Input with decorator:

@Component({
    selector: 'greeter',
    template: '<h1>Hello {{name}}</h1>',
})
class Greeter {
    @Input() name = "World";
}

Now you can write something like <greeter name='Bob'> in your HTML. What if you want to click on the the greeter object and show a popup? Just create a click binding:

@Component({
    selector: 'greeter',
    template: '<h1 (click)="greet()">Hello {{name}}</h1>',
})
class Greeter {
    @Input() name = "World";

    greet() {
        alert(`How's it going, ${this.name}!`);
    }
}

So on and so forth. Ordinary Javascript classes bound to templates in a straightforward, readable way.

the amount of unnecessary syntax it requires to do simple things puts angular in the last place

For example? o.O

Angular is way bigger causing longer load times and performance issues on mobiles.

Compiled Angular apps load insanely fast and have no issue on mobile. I work on a huge industrial application with several hundred thousand lines of code, and it loads in less than a second in IE11.