Created
November 29, 2012 09:59
-
-
Save dearfrankg/4167921 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOV-29-2012 | |
Ran into a puzzling issue with AngularJS and Taffy | |
I have two code examples: | |
WORKING: | |
http://plnkr.co/edit/fAgtyq?p=preview | |
BROKEN | |
http://plnkr.co/edit/EigEgN?p=preview | |
The gist of the problem (no pun intended) | |
I used to be able to do this with an older version of angularJS | |
CONTROLLER SNIPPET | |
// get the json | |
$http.get('data.json').success(function(data) { | |
// put taffy object into scope variable | |
$scope.data = TAFFY(data); | |
}); | |
TEMPLATE SNIPPET | |
// show count of database objects | |
{{ data().count() }} | |
WORKAROUND | |
Now as a workaround I have to do this: | |
$scope.taffy.data = TAFFY(data); | |
NOTE: | |
I did not need the work-around in an older version of angularJS | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment