Skip to content

Commit 5e3de9b

Browse files
committed
Fixed bug in uiView component not loading the CommonModule.
1 parent 45d4103 commit 5e3de9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/directives/uiView.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
} from '@uirouter/core';
3434
import { Ng2ViewConfig } from '../statebuilders/views';
3535
import { MergeInjector } from '../mergeInjector';
36+
import { CommonModule } from '@angular/common';
3637

3738
/** @hidden */
3839
let id = 0;
@@ -111,6 +112,7 @@ const ng2ComponentInputs = (factory: ComponentFactory<any>): InputMapping[] => {
111112
selector: 'ui-view, [ui-view]',
112113
exportAs: 'uiView',
113114
standalone: true,
115+
imports: [CommonModule],
114116
template: `
115117
<ng-template #componentTarget></ng-template>
116118
<ng-content *ngIf="!_componentRef"></ng-content>

src/uiRouterNgModule.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import {
77
Injector,
88
APP_INITIALIZER,
99
} from '@angular/core';
10-
import { CommonModule, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
10+
import { LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
1111
import { _UIROUTER_DIRECTIVES } from './directives/directives';
12-
import { UIView } from './directives/uiView';
1312
import { UrlRuleHandlerFn, TargetState, TargetStateDef, UIRouter, TransitionService } from '@uirouter/core';
1413
import { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from './providers';
1514

@@ -72,7 +71,6 @@ export function locationStrategy(useHash) {
7271
*/
7372
@NgModule({
7473
imports: [
75-
CommonModule,
7674
_UIROUTER_DIRECTIVES
7775
],
7876
exports: [_UIROUTER_DIRECTIVES],

0 commit comments

Comments
 (0)