ng-model binding to custom directives taking too long
mboudreau opened this issue · 1 comments
mboudreau commented
I have a custom directive that requires an ngModel, which I set myself within deckgrid card template like so:
<div deckgrid class="deckgrid" source="entries">
<journal-entry ng-model="card" tag-search="mother.searchTags></journal-entry>
</div>
However, when the controller in my custom directive runs, the scope variable set as entry: '=ngModel'
is undefined since it seems to not have been binded yet ($scope.entry is undefined). This use to work perfectly well until I integrated it with deckgrid. Since the template I use for my directive is all binded, it does show the appropriate data when the model becomes available within the scope, but it's a problem when I have to set certain defaults in my controller.