In Angular "Todo App" tutorial on official meteor.com website in constructor there's:
$scope.viewModel(this);
In "Socially" tutorial on angular-meteor.com it looks like the very same thing is achieved by:
$reactive(this).attach($scope)
What's the difference?
Ok, so I did some research on the subject and here is what I found out.
Regarding $reactive(this).attach($scope):
"$reactive is a service that takes care of the reactivity of your Meteor data, and updates your AngularJS code."
"This service wraps context (can be used with this or $scope) - so you can use it with any context as you wish."
Read details about it here.
Regarding $scope.viewModel(this):
It looks like it is a package, a library:
"ViewModel is a view layer for Meteor. You can think of it as Angular, Knockout, Aurelia, Vue, etc. but without the boilerplate code required to make those work."
More information about it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With