angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.54k stars 3k forks source link

'UrlRouterProvider' missing from typings in RC1 #3296

Closed ashgibson closed 7 years ago

ashgibson commented 7 years ago

I am getting the following typescript compilation error

Module '"/%path%/node_modules/angular-ui-router/lib/index"' has no exported member 'UrlRouterProvider'.

This is my imports to get it working:

import {StateProvider} from 'angular-ui-router';
import {UrlRouterProvider} from "../../../../node_modules/angular-ui-router/lib/urlRouterProvider";

I think export * from "./urlRouterProvider"; is missing from index.d.ts?

christopherthielen commented 7 years ago

Will fix for rc.2, but recommend you migrate to $urlService and/or $urlServiceProvider.

https://github.com/angular-ui/ui-router/releases/tag/1.0.0-rc.1

https://ui-router.github.io/ng1/docs/latest/modules/injectables.html#_urlserviceprovider