Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Fix "on-" callback issues when using use-strings="true" #875

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cgatesman
Copy link

@cgatesman cgatesman commented Nov 27, 2018

Fixes #874

Several issues were found while debugging and fixing #874:

  • Pass just tag name string to callback functions when using use-strings="true"
  • Call callback functions in a $timeout to ensure model has been appropriately updated with just tag strings before the callback is called. The model is updated by a series of events and a watcher so it is asynchronously updated on an add or remove.
  • Use $watchCollection for tags watcher
  • Do not clobber tags container when adding/removing items

Fixes mbenford#874

Several issues were found while debugging and fixing mbenford#874:

- Pass just tag name string to callback functions when using `use-strings="true"`
- Call callback functions in a `$timeout` to ensure model has been appropriately updated with just tag strings before the callback is called.  The model is updated in a watcher so it is asynchronously updated
- Use `$watchCollection` for tags watcher
- Do not clobber tags container when adding/removing items
@coveralls
Copy link

coveralls commented Nov 27, 2018

Coverage Status

Coverage decreased (-0.4%) to 99.416% when pulling 28dd1c5 on NorthPage:cg-874 into 87d0e6b on mbenford:master.

@cgatesman cgatesman changed the title Fix issues when using use-strings="true" Fix "on-" callback issues when using use-strings="true" Nov 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object passed to on-tag-added with use-strings="true"
2 participants