-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
In node_modules/@uirouter/visualizer/lib/visualizer.d.ts:
import { UIRouter, UIRouterPlugin } from "@uirouter/core";
should be:
import { UIRouter, UIRouterPlugin } from "@uirouter/angular";
If not, the following code will not be compiled:
import {UIRouter} from "@uirouter/angular";
import {Visualizer} from "@uirouter/visualizer";
/** UIRouter Config */
export function uiRouterConfigFn(router: UIRouter) {
router.urlService.rules.otherwise({state: 'hello'});
router.plugin(Visualizer);
}
And the error message is:
ERROR in .../src/app/config/router.config.ts (11,17): Argument of type 'typeof Visualizer' is not assignable to parameter of type 'PluginFactory<UIRouterPlugin>'. Type 'typeof Visualizer' provides no match for the signature '(router: UIRouter, options?: any): UIRouterPlugin'.
Because the UIRouter comes from different files, although they have the same contents.
dependencies:
"@angular/animations": "^4.0.0",
...
"@uirouter/angular": "^1.0.0-beta.7",
"@uirouter/visualizer": "^4.0.2",
Metadata
Metadata
Assignees
Labels
No labels