angularjs-migration icon indicating copy to clipboard operation
angularjs-migration copied to clipboard

How to get angularJs state resolve data in Angular Component ?

Open VipulRSI opened this issue 3 years ago • 0 comments

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 }))

VipulRSI avatar Aug 17 '22 14:08 VipulRSI