Is there a way to pass data using resolve and bindings to a component in views? I had success passing data to the controller, but it seems to not work with components.
.config(function ($stateProvider) {
$stateProvider
.state('stState', {
url: '/state',
ncyBreadcrumb: {
label: 'State'
},
views: {
'': {
component: 'stState'
}
},
resolve: {
data: function (dataService) {
return dataService.getData();
}
}
});
})
.component('stState', {
templateUrl: 'app/stState/stState.html',
controller: StStateController,
bindings: {
data: '<'
}
});
function StStateController() {
this.data = {};
}