Tagtics

TTaaggttiiccss

Overview

  • Introduction
  • Features
  • Tech Stack

Implementations

  • Client Overview
  • React / Next.js
  • Vue 3
  • Angular
  • Svelte
  • Solid.js
  • Vanilla JS / HTML
DDooccss
Dashboard
ImplementationsAngular
Implementation Guide

Angular Integration

Integrate TTaaggttiiccss using modern lifecycle hooks. The client automatically handles route changes for you.

Initialization

Call init when your app mounts and destroy when it unmounts to prevent memory leaks.

import { Component, OnInit, OnDestroy } from '@angular/core';

@Component({...})
export class AppComponent implements OnInit, OnDestroy {
  private script?: HTMLScriptElement;

  ngOnInit() {
    this.script = document.createElement('script');
    this.script.src = 'https://cdn.tagtics.online/client.js';
    this.script.async = true;
    this.script.onload = () => {
      (window as any).Tagtics?.init({ apiKey: 'YOUR_API_KEY' });
    };
    document.body.appendChild(this.script);
  }

  ngOnDestroy() {
    (window as any).Tagtics?.destroy();
    this.script?.remove();
  }
}