What I need: Create a custom directive to display a table, just for exercise.
What I have: I have the directive with the data harcoded, example in this fiddle, and works fine.
My problem: When I change the data harcoded to a data from a WS using $http on the controller the data is not displayed on the table (I'm think is a synchronization issue).
I'm believe the problem is because the data isn't refreshed when it's gotten from the WS. But I don´t know how to use $watch and if it is needed to.
I'm realize the problem was in the JSON data structure form WS witch didn't match with the expected directive structure. The data is automatically refreshed when change, I'm believe that is because I'm using ng-repeat inside, that implements watch in the code.
If there is someone that could confirm that I'll be grateful. Thanks