Issue with Angular JS
@numtel @dandv
My tasks object gets updated but the view doesn't refresh the new value. I'm using Meteor JS with Angular js.
angular.module('blaze-angular-scope',['angular-meteor']);
angular.module("blaze-angular-scope").controller("AngularCtrl", ['$scope', function($scope){ $scope.delivery = deliveryExecutives;
//TRIED THIS AS WELL $scope.$watch('delivery',function(){ $scope.delivery = deliveryExecutives; },true); }]);
Template.ordersBlazeTemplate.helpers({ orders: function() { return orders.reactive(); }, deliveryExecutives: function(){ return deliveryExecutives.reactive(); } });
Tried both of them.
This works if I use blaze instead of Angular, but I wanna move onto angular js with meteor and using your package. Please help.
Thanks
If you want me to take a look, give a link to a repository with the minimal code to reproduce the issue that I can clone.
Hello,
Just clone from the following url and change the db to your db. Pull the sql file into your database and update the configuration. Basically trying to update the view when the value changes. https://github.com/rishab-yumist/Console-Test.git
On Thu, Sep 10, 2015 at 1:10 AM, Ben Green [email protected] wrote:
If you want me to take a look, give a link to a repository with the minimal code to reproduce the issue that I can clone.
— Reply to this email directly or view it on GitHub https://github.com/numtel/meteor-mysql/issues/34#issuecomment-139024605.
Hello Ben,
Did you find time to check out the repo?
Curiously waiting for your reply on this.
Thanks :)
On Thu, Sep 10, 2015 at 10:41 AM, Rishab Narang [email protected] wrote:
Hello,
Just clone from the following url and change the db to your db. Pull the sql file into your database and update the configuration. Basically trying to update the view when the value changes. https://github.com/rishab-yumist/Console-Test.git
On Thu, Sep 10, 2015 at 1:10 AM, Ben Green [email protected] wrote:
If you want me to take a look, give a link to a repository with the minimal code to reproduce the issue that I can clone.
— Reply to this email directly or view it on GitHub https://github.com/numtel/meteor-mysql/issues/34#issuecomment-139024605 .
Your database dump doesn't contain the delivery_executive table used in the query. Maybe include a new dump with only a few rows in each table?
Also, I didn't try to connect to it but I hope that those commented out database credentials do not really work.
I was unable to attach file here so I mailed it to your other id. Could you check it out?
On Fri, Sep 11, 2015 at 1:29 PM, Ben Green [email protected] wrote:
Your database dump doesn't contain the delivery_executive table used in the query. Maybe include a new dump with only a few rows in each table?
Also, I didn't try to connect to it but I hope that those commented out database credentials do not really work.
— Reply to this email directly or view it on GitHub https://github.com/numtel/meteor-mysql/issues/34#issuecomment-139478074.
Hello ben,
any updates?
On Fri, Sep 11, 2015 at 3:21 PM, Rishab Narang [email protected] wrote:
I was unable to attach file here so I mailed it to your other id. Could you check it out?
On Fri, Sep 11, 2015 at 1:29 PM, Ben Green [email protected] wrote:
Your database dump doesn't contain the delivery_executive table used in the query. Maybe include a new dump with only a few rows in each table?
Also, I didn't try to connect to it but I hope that those commented out database credentials do not really work.
— Reply to this email directly or view it on GitHub https://github.com/numtel/meteor-mysql/issues/34#issuecomment-139478074 .
You do not want to use the $scope.$meteorSubscribe method because that only works with the Mongo Meteor.subscribe subscriptions. Instead, force $scope to update when the subscription updates.
angular.module('console').controller('TodosListCtrl', ['$scope', '$meteor',
function ($scope, $meteor) {
$scope.delivery = deliveryExecutives;
deliveryExecutives.addEventListener('update', function(diff, data) {
$scope.$apply()
});
}]);
This is insane :) It works.
Thanks a ton Ben. You couldn't be any more helpful :)
Cheers.
On Wed, Sep 16, 2015 at 12:51 AM, Ben Green [email protected] wrote:
You do not want to use the $scope.$meteorSubscribe method because that only works with the Mongo Meteor.subscribe subscriptions. Instead, force $scope to update when the subscription updates.
angular.module('console').controller('TodosListCtrl', ['$scope', '$meteor',function ($scope, $meteor) {
$scope.delivery = deliveryExecutives;
deliveryExecutives.addEventListener('update', function(diff, data) { $scope.$apply() });
}]);
— Reply to this email directly or view it on GitHub https://github.com/numtel/meteor-mysql/issues/34#issuecomment-140507409.