splitio / angular-sdk-plugin

This repository contains a plugin for the Angular framework, that integrates with Split JS SDK and offers an integrated experience with the Angular framework
Other
1 stars 1 forks source link

Localhost Mode #26

Open NickFratinTR opened 2 years ago

NickFratinTR commented 2 years ago

I'm trying to run split in localhost mode like you can in the Javascript sdk. It doesn't seem to be working and I'm wondering if that is a feature that just isn't ready yet in this Angular sdk, or if I'm missing some configuration?

maxrzaw commented 3 months ago

For anyone finding this later. Localhost mode is supported by the angular-sdk-plugin. You need to add LocalhostFromObject() to your config. For example:

config: SplitIO.IBrowserSettings = {
  core: {
    authorizationKey: '',
    key: '',
  },
  sync: {
    localhostMode: LocalhostFromObject(),
  },
  // localhost mocks go here
  features: {
    feature_flag_name: 'on',
  },
};