I\'m writing an Angular 1.5 directive and I\'m running into an obnoxious issue with trying to manipulate bound data before it exists.
Here\'s my code:
ap
You could use the new lifecycle hooks, specifically $onChanges, to detect the first change of a binding by calling the isFirstChange method. Read more about this here.
isFirstChange
Here's an example: