JavaScript framework differences
Xvezda opened this issue · 0 comments
Xvezda commented
Prefix
- Vue:
v-[a-z]
- Angular:
*ng[A-Z]
Data binding
- Vue:
v-bind:attribute="value"
- Angular:
[attribute]="value"
- React:
attribute={value}
Event binding
- Vue:
v-on:event="handler"
- Angular:
(event)="handler"
- React:
onevent={handler}
Text binding
- Vue:
{{ text }}
- Angular:
{{ text }}
- React:
{ text }
Immutable property
- Vue:
this.props
- Angular:
@Input() props
- React:
this.props
Event propagation
- Vue:
this.$emit('event')
- Angular:
@Output() output = new EventEmitter
Component
TODO