Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function routerConfigFn(router: UIRouter): void {
router.trace.enable(Category.TRANSITION);
// Enable UI-Router visualizer here if needed (for development purposes only)
// if (ENV === "development") {
// router.plugin(Visualizer); // Visualizer should be imported from "@uirouter/visualizer"
// }
}
export function routerConfigFn(router: UIRouter): void {
router.trace.enable(Category.TRANSITION);
// Enable UI-Router visualizer here if needed (for development purposes only)
// if (ENV === "development") {
// router.plugin(Visualizer); // Visualizer should be imported from "@uirouter/visualizer"
// }
}
const changeTraceSetting = (newValue: string) => {
const trace = $uiRouter.trace;
trace.disable();
if (typeof newValue === 'string') {
if (newValue.toUpperCase() === 'TRUE') {
trace.enable(Category.TRANSITION);
} else if (newValue.toUpperCase() === 'ALL') {
trace.enable();
} else {
const traceValues = newValue.split(',').map(str => str.trim().toUpperCase());
trace.enable(...(traceValues as any));
}
}
};
export function routerConfigFn(router: UIRouter) {
const transitionService = router.transitionService;
requiresAuthHook(transitionService);
googleAnalyticsHook(transitionService);
router.trace.enable(Category.TRANSITION);
router.plugin(Visualizer);
}