You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
I was just about to implement something like this myself. Just to make sure I understand, is this supposed to be a shortcut for
someObservable.safeApply($scope, function(value) {
this.prop = value; // when using controllerAs
// or
$scope.prop = value;
}).subscribe();
Because that's what I'm looking for.
Wouldn't the $assignProperty operator always need a scope as the first argument so it can delegate to safeApply internally? Even when setting a controller property & using the controllerAs syntax, I think you still have to invoke a $apply() on a Scope instance to get Angular to notice the change.
@mattpodwysocki is this something you'd be interested in accepting?
Looks like this already exists as .digest(), but it's not documented.
// assign someObservable's values to $scope.myProperty, then run a digest if necessary.someObservable.digest($scope,'myProperty').subscribe();// assign someObservable's values to a controller property `myProperty`, then run a digest if necessary.someObservable.digest($scope,'ctrl.myProperty').subscribe();
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello @mattpodwysocki. What about if I'll implement couple operators like a
assignProperty
andassignProperties
? They should be use so:The text was updated successfully, but these errors were encountered: