I have a component which takes care of drawing two lists, but in the component there is no data so nothing is drawn.
myController
function loadAllData() {
Admin.getAllSettings()
.then(function (settings) {
$scope.settings = settings.data;
})
}
myComponent
{
bindings: {
selectedData: '=',
availableData: '<'
},
templateUrl: 'global/twoListSelector.directive.html',
controller: function () {
var me = this;
console.log(me);
}
}
myView
<two-side-selector selectedData="doctorProperties" availableData="settings"></two-side-selector>
In the console.log the output for me.settings is undefined. Shouldn't the digest cycle update the setting property so it gets to the component? The service is returning data correctly but it is not getting to the component
I am using angular 1.5.9
loadAllData()function on yourscope? It's normal that there is no data if you don't call the data function on the myComponent scope.availableData="settings"should refer to the data returned by serviceconsole.log($scope.settings)in your promise success handler, does it print some datas ?