1.0.0-beta.3
christopherthielen
released this
23 Sep 18:30
·
567 commits
to master
since this release
(2016-09-23) diff
This release adds Angular 2.0.0 final support.
It changes the NgModule mechanism to use UIRouterModule.forRoot()
and UIRouterModule.forChild()
.
See the blog and the breaking changes section.
Bug Fixes
This release fixes bugs for both ng1 and ng2
- common: Remove
url()
from LocationService interface (#2990) (d6c2580) - lazyLoad: Always delete the lazy load promise after it settles. (dd2f101)
- ng1.StateProvider: Export StateProvider class so type can be used (167770d)
- ng1.uiView: Remove deprecated jquery functions bind/unbind in favor of on/off (60ebd44)
- ng2: Angular 2.0.0 final compatibility (7c54b75), closes #2991
- ng2.NgModule: Allow apps with no forChild modules (d3bd332), closes #3009
- ng2.uiView: Use ReflectorReader to get component inputs
- resolve: Don't re-resolve data when redirected to same state, but only dynamic params changed. (98cd2d2), closes #3033
- trace: Show function definition during logging of trace.enable('HOOK') (190d122)
- transition: Fail a transition if a new one has started while resolves are loading (bc87d9e), closes #2972
- urlMatcherFactory: fix tilde edge case with "string" encoding (#3018) (a201906)
- viewService: Allow root ui-view to be wrapped in ng-if (32f718a), closes #3004
Features
- StateBuilder: Calculate parent state name when ends in two wildcards
**
(b4621f3)
BREAKING CHANGES
BC in Core
- Remove
UIInjector.native
infavor ofUIInjector.getNative()
(d11b7dc) - Remove
stateProvider
from ui-router-core. UsestateRegistry
andstateService
in 88c6494 - We now enforce states with an explicit
parent:
may NOT ALSO specify a parent state in their name (i.e.,parent.child
)
BC in Angular 2
Major breaking changes for Angular 2 bootstrap between beta.2 and beta.3
- Removed
@UIRouterModule
decorator. - Added
UIRouterModule.forRoot()
andUIRouterModule.forChild()
factory methods - See https://ui-router.github.io/docs/latest/classes/ng2.uiroutermodule.html
@NgModule({
imports: [
UIRouterModule.forRoot({
states: INITIAL_STATES,
useHash: true,
configClass: MyUIRouterConfig
}),
BrowserModule,
FeatureModule,
],
declarations: INITIAL_COMPONENTS
})
class RootAppModule {}
@NgModule({
imports: [
UIRouterModule.forChild({
states: FEATURE_STATES,
configClass: FeatureConfig
}),
CommonModule,
],
declarations: FEATURE_COMPONENTS
})