Angular SDK for [Rollgate](https://rollgate.io), a feature‑flag platform with scheduled releases and gradual rollouts.
Angular SDK for Rollgate, a feature‑flag platform with scheduled releases and gradual rollouts.
Rollgate SDKs
Official SDKs for Rollgate - Feature flags made simple.
Rollgate Overview
Rollgate is a feature management platform that helps teams release features safely and iterate faster. Get started using Rollgate today!
Available SDKs
| SDK | Package | Install | Docs |
|---|---|---|---|
| Node.js | @rollgate/sdk-node | npm install @rollgate/sdk-node |
README |
| React | @rollgate/sdk-react | npm install @rollgate/sdk-react |
README |
| Vue | @rollgate/sdk-vue | npm install @rollgate/sdk-vue |
README |
| Angular | @rollgate/sdk-angular | npm install @rollgate/sdk-angular |
README |
| Svelte | @rollgate/sdk-svelte | npm install @rollgate/sdk-svelte |
README |
| Go | sdk-go | go get github.com/rollgate/sdks/packages/sdk-go |
README |
| Java | sdk-java | Maven/Gradle | README |
| Python | rollgate | pip install rollgate |
README |
| Flutter | rollgate | dart pub add rollgate |
README |
| .NET | Rollgate.SDK | dotnet add package Rollgate.SDK |
README |
Supported Versions
| SDK | Minimum Version |
|---|---|
| Node.js | Node.js 18+ |
| React | React 16.8+ (requires Hooks) |
| Vue | Vue 3.0+ |
| Angular | Angular 14+ |
| Svelte | Svelte 4+ |
| Go | Go 1.21+ |
| Java | Java 11+ |
| Python | Python 3.9+ |
| Flutter | Dart 3.0+ / Flutter 3.0+ |
| .NET | .NET 8.0+ |
Browser Compatibility
The client-side SDKs (React, Vue, Angular, Svelte) work in all modern browsers:
- Chrome (latest 2 versions)
- Firefox (latest 2 versions)
- Safari (latest 2 versions)
- Edge (latest 2 versions)
For SSE streaming support, the browser must support EventSource. All modern browsers include this natively.
Getting Started
Refer to the Getting Started Guide for detailed installation and setup instructions.
Quick Start - Node.js
import { RollgateClient } from "@rollgate/sdk-node";
const client = new RollgateClient({
apiKey: "your-api-key",
});
await client.init();
if (client.isEnabled("my-feature")) {
// New feature code
}
Quick Start - React
import { RollgateProvider, useFlag } from "@rollgate/sdk-react";
function App() {
return (
<RollgateProvider config={{ apiKey: "your-api-key" }}>
<MyComponent />
</RollgateProvider>
);
}
function MyComponent() {
const isEnabled = useFlag("my-feature");
return isEnabled ? <NewFeature /> : <OldFeature />;
}
Event Tracking
All SDKs support tracking conversion events for A/B testing:
// Track a conversion event
client.track({
flagKey: "checkout-redesign",
eventName: "purchase",
userId: "user-123",
value: 29.99,
});
// Flush pending events
await client.flushEvents();
For other SDKs (Vue, Go, Java, Python, Flutter, .NET), see the Getting Started Guide.
Features
All SDKs include:
- Local evaluation - Evaluate flags locally for minimal latency
- Real-time updates - SSE streaming for instant flag changes
- Caching - Built-in caching with stale-while-revalidate
- Circuit breaker - Automatic fallback on API failures
- Retry with backoff - Exponential backoff with jitter
- Event tracking - Track conversion events for A/B testing
- TypeScript support - Full type definitions (TypeScript SDKs)
Learn More
| Document | Description |
|---|---|
| Getting Started | Installation and first steps |
| Architecture | SDK architecture and patterns |
| Production Setup | Best practices for production |
Full documentation available at docs.rollgate.io
API Keys
Rollgate uses prefixed API keys to distinguish between server and client usage:
| Type | Prefix | Use Case |
|---|---|---|
| Server | sb_server |
Backend (Node, Go, Java, Python) |
| Client | sb_client |
Frontend (React, Vue, Angular, Svelte) |
Important: Never expose server keys in client-side code. Use client keys for browser applications.
Testing
We run integration tests for all SDKs using GitHub Actions. Tests cover flag evaluation, caching, retry logic, circuit breaker behavior, and SSE streaming. See the CI workflow for details.
Contributing
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to these SDKs.
About Rollgate
Rollgate is a feature management platform that allows developers to ship features safely and iterate quickly. With Rollgate, you can:
- Gradual rollouts - Release features to a percentage of users and increase gradually
- User targeting - Show features to specific users based on attributes (plan, country, etc.)
- Kill switches - Instantly disable features in production without redeploying
- A/B testing - Run experiments and measure impact on key metrics
- Scheduled releases - Plan feature launches in advance
Explore Rollgate
- rollgate.io - Main website
- docs.rollgate.io - Documentation
- app.rollgate.io - Dashboard
License
MIT License - see LICENSE for details.