ui-router-route-to-components icon indicating copy to clipboard operation
ui-router-route-to-components copied to clipboard

Problems with `angular-component.js` and `ui-router-route-to-components` working together

Open jjlorenzo opened this issue 9 years ago • 0 comments

Hi, I had problems with both polyfills if I want to use the injectable resolve properties into the component controller. Some help please.

    .state({
      name:      'referrals.received',
      url:       'received/',
      component: 'referralsReceived',
      resolve: {
        data: function() {
          return 'some data'
        }
      },
    })

...

.component('referralsReceived', {
  bindings: {
    data: '<',
  },
  controller: controller,
  templateUrl: 'src/referrals/received/received.html',
});

...

function controller() {
  console.log('data', this.data); // is undefined
}

ui-router-route-to-components: 0.1.0 angular-component.js: 0.1.3 angular: 1.3.15

jjlorenzo avatar Oct 10 '16 03:10 jjlorenzo