angular-localForage icon indicating copy to clipboard operation
angular-localForage copied to clipboard

Binding to an element in an scope array

Open davidtlee opened this issue 10 years ago • 2 comments

Is it possible to use the bind function to bind to a particular element in a scope array? e.g. if I wanted to bind a stored message array to the array scope.messages, I would do $localForage.bind($scope, 'messages').

But suppose I wanted to bind a particular stored message to a particular index within a scope array. Is there a way to do something like

$localForage.bind($scope, {
  key: 'message',
  scopeKey: 'messages[0]'
});

Thanks!

davidtlee avatar Aug 06 '15 15:08 davidtlee

You're trying to bind from localForage -> an index of a $scope array, am I understanding that correctly?

scotttrinh avatar Jun 15 '16 16:06 scotttrinh

I'm not going to promise this for 1.3.0, but I do like this idea. PR's welcome, or we can wait for 1.4.0.

scotttrinh avatar Jun 19 '16 22:06 scotttrinh