Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a bug of visualizer.d.ts for ng2 #32

Open
zhongsigang opened this issue Aug 10, 2017 · 0 comments
Open

a bug of visualizer.d.ts for ng2 #32

zhongsigang opened this issue Aug 10, 2017 · 0 comments

Comments

@zhongsigang
Copy link

zhongsigang commented Aug 10, 2017

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",
@zhongsigang zhongsigang changed the title visualizer.d.ts mistake for ng2 a bug of visualizer.d.ts for ng2 Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant