Vue 2.x, React, Angular 1.x
Last updated
Was this helpful?
Last updated
Was this helpful?
Vue Material issue
v-model v.s. ng-model
Achieve Two-way binding in AngularJS 1.x/Vue.js is easier than React JS, change from ui/controller side can cause change happen in another side
React use Controlled Component to achieve same mechanism.
Which the input value is inside React's state.
But it needs developer to craft this which is hook event listener manually.
ng-model / v-model just assign as directive at element template.
The Data-driven of Vue.js can update data at initial state easily without writing additional inital code. ()
React must invoke Dropdown options Web API at componemtDidl/WillMount and use componentWillReceiveProps to update the State by write those code manually.
Use data-driven of Vue.js just assign to the variable of first dropdown's options variable, it will cause second, third. fouth to change options automatically because of we use computed or watch mechanism of Vue.js
Example, Association Dropdown