This post describes how UMD bundles have changed with UI-Router 1.0 for AngularJS.
angular-ui-router has been the defacto standard for routing in AngularJS.
However, over the years UI-Router has undergone some significant transformations.
The core of the library has been refactored into its own library,
This core library has been used to create new routers for
It’s Just Angular (2.x+),
Polymer, and even
Plugins and UMD bundles
Previously, UI-Router was a single bundle:
During the UI-Router for AngularJS 1.0 release, we split the code into two bundles:
ui-router-core.js: the core of UI-Router (State machine, etc)
ui-router-angularjs.js: the AngularJS bits (
Users who formerly included only
angular-ui-router.js should now include both bundles.
This change was necessary to properly support dependencies to
This enables (for example) router plugins which work with the framework-agnostic
Note: we also renamed our NPM packages to scoped package names.
If you formerly used
Instead, use both new bundles from the scoped packages.
ui-router-core before including
Ensure the version of
@uirouter/core matches the dependency in
Backward compatible mono-bundle
For backwards compatibility, we will continue to publish a monolithic bundle as
This bundle includes both the core and angularjs code.
Existing users who rely on the
angular-ui-router.js bundle do not have to change anything.
However, this bundle is not compatible with UI-Router plugins which depend on
Users of webpack (or any bundlers which use node module resolution) should not need to make any changes due to these bundle changes.
import from the scoped package
@uirouter/angularjs instead of from