Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Angular FeatureCheckerService how to import in app-navigation.service.ts #7594


User avatar
0
rvanwoezik created

In my navigation menu (angular) i like to import the FeatureCheckerService, so i can display menu items only for certain tenants/editions.

Like this: new AppMenuItem('Users', 'Pages.Administration.Users', 'flaticon-users', '/app/admin/users', undefined, undefined, undefined, () => { return this._featureCheckerService.isEnabled('App.ChatFeature'); })

But how to import the FeatureCheckerService?

import { FeatureCheckerService } from '.............


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    My mistakel, you are right!

    import { FeatureCheckerService } from '@abp/features/feature-checker.service';
    

    see: https://github.com/aspnetzero/aspnet-zero-core/issues/1632#issuecomment-428900148

  • User Avatar
    0
    rvanwoezik created

    Thnx!