Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

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

Open
jjlorenzo opened this issue Oct 10, 2016 · 0 comments

Comments

@jjlorenzo
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant