Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function makeRouter() {
const router = new UIRouterReact();
router.plugin(servicesPlugin);
router.plugin(hashLocationPlugin);
// Debug visualizer
if ($featureFlags.debugRouter) {
// tslint:disable-next-line:no-require-imports
router.plugin(require('@uirouter/visualizer').Visualizer);
router.trace.enable('TRANSITION');
}
// Register the initial (eagerly loaded) states
states.forEach((state) => router.stateRegistry.register(state));
// Global config for router
router.urlService.rules.initial({ state: 'default-account' });
router.urlService.rules.otherwise({ state: 'default-account' });
import {
pushStateLocationPlugin,
UIRouterReact,
UISref,
UIView,
} from "@uirouter/react";
import { ConnectedUIRouter } from "@uirouter/redux/react";
import * as React from "react";
import { Provider } from "react-redux";
import createRoutedStore from "./redux/store";
import states from "./router/states";
const router = new UIRouterReact();
const store = createRoutedStore(router);
const App = () => (
<div>
<nav>
<ul>
<a>
<li>home</li>
</a></ul></nav></div>