Browse Source
Merge pull request #9302 from abpframework/auto-merge/rel-4-3/437
Merge branch dev with rel-4.3
pull/9303/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
18 additions and
15 deletions
-
docs/en/Dependency-Injection.md
-
npm/ng-packs/apps/dev-app/src/app/app.module.ts
-
npm/ng-packs/apps/dev-app/src/app/route.provider.ts
-
npm/ng-packs/packages/account/config/src/providers/route.provider.ts
-
npm/ng-packs/packages/core/src/lib/services/routes.service.ts
-
npm/ng-packs/packages/identity/config/src/providers/route.provider.ts
-
npm/ng-packs/packages/tenant-management/config/src/providers/route.provider.ts
-
npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html
|
|
|
@ -59,9 +59,9 @@ Some specific types are registered to dependency injection by default. Examples: |
|
|
|
* MVC controllers (inherit ``Controller`` or ``AbpController``) are registered as transient. |
|
|
|
* MVC page models (inherit ``PageModel`` or ``AbpPageModel``) are registered as transient. |
|
|
|
* MVC view components (inherit ``ViewComponent`` or ``AbpViewComponent``) are registered as transient. |
|
|
|
* Application services (implement ``IApplicationService`` interface or inherit ``ApplicationService`` class) are registered as transient. |
|
|
|
* Repositories (implement ``IRepository`` interface) are registered as transient. |
|
|
|
* Domain services (implement ``IDomainService`` interface) are registered as transient. |
|
|
|
* Application services (inherit ``ApplicationService`` class or its subclasses) are registered as transient. |
|
|
|
* Repositories (implement ``BasicRepositoryBase`` class or its subclasses) are registered as transient. |
|
|
|
* Domain services (implement ``IDomainService`` interface or inherit ``DomainService`` class) are registered as transient. |
|
|
|
|
|
|
|
Example: |
|
|
|
|
|
|
|
|
|
|
|
@ -1,3 +1,4 @@ |
|
|
|
import { AccountConfigModule } from '@abp/ng.account/config'; |
|
|
|
import { CoreModule } from '@abp/ng.core'; |
|
|
|
import { registerLocale } from '@abp/ng.core/locale'; |
|
|
|
import { IdentityConfigModule } from '@abp/ng.identity/config'; |
|
|
|
@ -11,7 +12,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
|
|
|
import { InspectorModule } from '@ngneat/inspector'; |
|
|
|
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin'; |
|
|
|
import { NgxsModule } from '@ngxs/store'; |
|
|
|
import { AccountConfigModule } from '@abp/ng.account/config'; |
|
|
|
import { environment } from '../environments/environment'; |
|
|
|
import { AppRoutingModule } from './app-routing.module'; |
|
|
|
import { AppComponent } from './app.component'; |
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { RoutesService, eLayoutType } from '@abp/ng.core'; |
|
|
|
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
|
|
|
import { APP_INITIALIZER } from '@angular/core'; |
|
|
|
|
|
|
|
export const APP_ROUTE_PROVIDER = [ |
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ export function configureRoutes(routes: RoutesService) { |
|
|
|
return () => { |
|
|
|
routes.add([ |
|
|
|
{ |
|
|
|
path: '/account', |
|
|
|
path: undefined, |
|
|
|
name: eAccountRouteNames.Account, |
|
|
|
invisible: true, |
|
|
|
layout: eLayoutType.application, |
|
|
|
|
|
|
|
@ -135,7 +135,8 @@ export abstract class AbstractTreeService<T extends object> { |
|
|
|
@Injectable() |
|
|
|
export abstract class AbstractNavTreeService<T extends ABP.Nav> |
|
|
|
extends AbstractTreeService<T> |
|
|
|
implements OnDestroy { |
|
|
|
implements OnDestroy |
|
|
|
{ |
|
|
|
private subscription: Subscription; |
|
|
|
private permissionService: PermissionService; |
|
|
|
readonly id = 'name'; |
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ export function configureRoutes(routesService: RoutesService) { |
|
|
|
return () => { |
|
|
|
routesService.add([ |
|
|
|
{ |
|
|
|
path: '/identity', |
|
|
|
path: undefined, |
|
|
|
name: eIdentityRouteNames.IdentityManagement, |
|
|
|
parentName: eThemeSharedRouteNames.Administration, |
|
|
|
requiredPolicy: eIdentityPolicyNames.IdentityManagement, |
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ export function configureRoutes(routes: RoutesService) { |
|
|
|
return () => { |
|
|
|
routes.add([ |
|
|
|
{ |
|
|
|
path: '/tenant-management', |
|
|
|
path: undefined, |
|
|
|
name: eTenantManagementRouteNames.TenantManagement, |
|
|
|
parentName: eThemeSharedRouteNames.Administration, |
|
|
|
requiredPolicy: eTenantManagementPolicyNames.TenantManagement, |
|
|
|
|
|
|
|
@ -62,12 +62,14 @@ |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template #defaultChild let-child> |
|
|
|
<div class="dropdown-submenu" *abpPermission="child.requiredPolicy"> |
|
|
|
<a class="dropdown-item" [routerLink]="[child.path]" (click)="closeDropdown()"> |
|
|
|
<i *ngIf="child.iconClass" [ngClass]="child.iconClass"></i> |
|
|
|
{{ child.name | abpLocalization }}</a |
|
|
|
> |
|
|
|
</div> |
|
|
|
<ng-container *ngIf="child.path"> |
|
|
|
<div class="dropdown-submenu" *abpPermission="child.requiredPolicy"> |
|
|
|
<a class="dropdown-item" [routerLink]="[child.path]" (click)="closeDropdown()"> |
|
|
|
<i *ngIf="child.iconClass" [ngClass]="child.iconClass"></i> |
|
|
|
{{ child.name | abpLocalization }}</a |
|
|
|
> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template #dropdownChild let-child> |
|
|
|
|