back to catalog
OtherSample App
works in free trial | Built on 8.4.0

Angular Starter App Get code

Code by ThoughtSpot

This app is an example Angular app for embedding ThoughtSpot elements using the Visual Embed SDK. It is designed to work with the Sample Retail Apparel dataset included with the ThoughtSpot Free Trial account. It contains example code for: * basic authentication * embedding a search component * embedding a liveboard component

Rate this code

Thank you for rating this code!

Installation instructions

Step 1

Sign up for Free Trial account

You will need a ThoughtSpot Free Trial account here.

Step 2

Clone the Github repository

git clone Change directories to thoughtspot-angular

Step 3

Install Angular

npm install -g @angular/cli

Step 4

Install dependencies

npm install

Step 5

Configure the app

Once you have activated your free trial, you will want to adjust the TS_URL variable in app.component.ts to reflect the URL of your free trial environment.

Each embedded component requires a unique identifier to tell the Visual Embed SDK which ThoughtSpot component to render. The best way to retrieve the specific id is via the Developer Playground. Depending on which component you are using (Search, Liveboard), the id may be called something slightly different. Refer to the code samples in this project to see the specific names, then, within the Playground, retrieve the required value. For example, when using a Search component, the Visual Embed SDK requires a dataSource id, which can be retrieved by changing the data source here.

Step 6

Run the app

Ng serve

Once the app is running, you can navigate to http://localhost:4200 to check it out. Try navigating to one of the subpages via the hamburger menu. The first time you access a page with an embedded component you will be prompted to log into your Free Trial account.

This project was generated with Angular CLI version 14.0.0.

Get code