Skip to content

How to get angularJs state resolve data in Angular Component ?  #8

Description

@VipulRSI

How to get angularJs state resolve data in Angular Component ?
here is the example how do i get currentAccount value in component ?

export default function BaseStates($stateProvider) {
$stateProvider
.state('base', {
url: '/',
abstract: true,
resolve: {
currentAccount: function() {
return 'some Data'
}
},
views: {
'appBroker@base': {
template: '',
}
}
});
}

@component({
selector:'appBroker',
template:<div *ngIf="currentAccountt.owner" class="card mt-5 text-center">...</div>,
})
export class AppBrokerComponent {
constructor(){
}
}

angular.module('mySurex').directive('appBroker', downgradeComponent({
component: AppBrokerComponent
}))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions