Iframe to load authorised trak urls
Explore Trak »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Trak Iframe focusing to embeded authorised way of showing websites inside a Iframe.
Trak Iframe
_Below is an example of how we can add trak iframe into your project.
- Install Trak Iframe Package
npm install trakiframe
yarn add trakiframe
- Import Trak Iframe
or
const TrakComponent = require('trakiframe');
import * as Trak from 'trakiframe';
- Initialize Trak Iframe with Token
using
init
methodusingTrakComponent.init({ token: 'Token', })
init
method with publickey and tokenor usingTrakComponent.init({ token: 'Token', publicKey: <---key----> })
init
method encrypting using package functionTrakComponent.init({ token: TrakComponent.encrypt(token), })
- Load iframe using
show
method eg: button ClickTrakComponent.show({...});
const mountComponent = () => { TrakComponent.show({ 'physiotherapist_name': 'fer', 'patient_name': 'qqqq', 'component': 'metrics', }) }
<button onClick={mountComponent}>Click</button>
- Remove iframe
using
remove
methodTrakComponent.remove();
Import styles from package to app
1.in Angular.json file projects -> demo -> architect -> build -> options -> styles
add
```json
"./node_modules/trakiframe/trakStyle.css"
```
Distributed under the MIT License. See LICENSE.txt
for more information.