Skip to content

Commit

Permalink
Merge pull request #5585 from abpframework/docs/restructure
Browse files Browse the repository at this point in the history
Restructured Angular documentation
  • Loading branch information
armanozak authored Sep 23, 2020
2 parents 73778f5 + ae76faf commit 1285726
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 103 deletions.
2 changes: 1 addition & 1 deletion docs/en/UI/Angular/Config-State.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ Please refer to `Config.Environment` type for all the properties you can pass to

## What's Next?

- [Modifying the Menu](./Modifying-the-Menu.md)
- [HTTP Requests](./Http-Requests)
4 changes: 2 additions & 2 deletions docs/en/UI/Angular/Content-Projection-Service.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Content Projection
# Projecting Angular Content

You can use the `ContentProjectionService` in @abp/ng.core package in order to project content in an easy and explicit way.

Expand Down Expand Up @@ -75,4 +75,4 @@ projectContent<T extends Type<any> | TemplateRef<any>>(

## What's Next?

- [TrackByService](./Track-By-Service.md)
- [Confirmation Popup](./Confirmation-Service.md)
4 changes: 0 additions & 4 deletions docs/en/UI/Angular/Custom-Setting-Page.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,3 @@ export class AppComponent {
Navigate to `/setting-management` route to see the changes:

![Custom Settings Tab](./images/custom-settings.png)

## What's Next?

- [Lazy Loading Scripts & Styles](./Lazy-Load-Service.md)
4 changes: 2 additions & 2 deletions docs/en/UI/Angular/Dom-Insertion-Service.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Dom Insertion (of Scripts and Styles)
# Inserting Scripts & Styles to DOM

You can use the `DomInsertionService` in @abp/ng.core package in order to insert scripts and styles in an easy and explicit way.

Expand Down Expand Up @@ -137,4 +137,4 @@ The `has` method returns a boolean value that indicates the given content has al

## What's Next?

- [ContentProjectionService](./Content-Projection-Service.md)
- [Lazy Loading Scripts & Styles](./Lazy-Load-Service.md)
9 changes: 4 additions & 5 deletions docs/en/UI/Angular/Environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Every application needs some **environment** variables. In Angular world, this i

Current `Environment` configuration holds sub config classes as follows:

```typescript
```js
export interface Environment {
apis: Apis;
application: Application;
Expand All @@ -16,7 +16,7 @@ export interface Environment {

## Apis

```typescript
```js
export interface Apis {
[key: string]: ApiConfig;
default: ApiConfig;
Expand Down Expand Up @@ -56,7 +56,7 @@ Everything else will be sent to `"https://localhost:8080"`

## Application

```typescript
```js
export interface Application {
name: string;
baseUrl?: string;
Expand All @@ -80,7 +80,7 @@ Abp Framework supports this out of box.

To integrate an existing config json into the `environment`, you need to set `remoteEnv`

```typescript
```js
export type customMergeFn = (
localEnv: Partial<Config.Environment>,
remoteEnv: any,
Expand All @@ -106,4 +106,3 @@ export interface RemoteEnv {
## What's Next?

* [Service Proxies](./Service-Proxies.md)

4 changes: 2 additions & 2 deletions docs/en/UI/Angular/Lazy-Load-Service.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to Lazy Load Scripts and Styles
# Lazy Loading Scripts & Styles

You can use the `LazyLoadService` in @abp/ng.core package in order to lazy load scripts and styles in an easy and explicit way.

Expand Down Expand Up @@ -210,4 +210,4 @@ load(strategy: LoadingStrategy, retryTimes?: number, retryDelay?: number): Obser

## What's Next?

- [DomInsertionService](./Dom-Insertion-Service.md)
- [Projecting Angular Content](./Content-Projection-Service.md)
5 changes: 5 additions & 0 deletions docs/en/UI/Angular/List-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,8 @@ As of v3.0, with ngx-datatable, the `page` property has to be set as `0` for ini
```

**Important Note:** The `abp-table` is not removed, but is deprecated and will be removed in the future. Please consider switching to ngx-datatable.


## What's Next?

- [Easy *ngFor trackBy](./Track-By-Service.md)
29 changes: 13 additions & 16 deletions docs/en/UI/Angular/Multi-Tenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

ABP Angular UI supports the multi-tenancy. The following features related to multi-tenancy are available in the startup templates.


![Tenants Page](./images/tenants-page.png)

<p style="font-size:small;text-align:center;">Tenants page</p>

On the page above, you can;
Expand All @@ -13,13 +13,12 @@ On the page above, you can;
- Edit an existing tenant.
- Delete a tenant.


![Tenant Switching Component](./images/tenant-switching-box.png)

<p style="font-size:small;text-align:center;">Tenant Switching Component</p>

You can switch between existing tenants by using the tenant switching component in the child pages of the `AccountLayoutComponent` (like Login page). Angular UI sends the selected tenant id to the backend as `__tenant` header on each request.


## Domain Tenant Resolver

Angular UI can get the tenant name from the app running URL. You can determine the current tenant by subdomain (like mytenant1.mydomain.com) or by the whole domain (like mytenant.com). To do this, you need to set the `application.baseUrl` property in the environment:
Expand All @@ -32,10 +31,10 @@ Subdomain resolver:
export const environment = {
//...
application: {
baseUrl: 'https://{0}.mydomain.com/'
baseUrl: "https://{0}.mydomain.com/",
},
//...
}
};
```

**{0}** is the placeholder to determine current tenant's unique name.
Expand All @@ -44,7 +43,6 @@ After the configuration above, if your app runs on the `mytenant1.mydomain.com`,

> **Important Note:** If you define the `baseUrl` with the placeholder (**{0}**), the tenant switching component in the child pages of the `AccountLayoutComponent` (like Login page) will be hidden.

Domain resolver:

```js
Expand All @@ -53,10 +51,10 @@ Domain resolver:
export const environment = {
//...
application: {
baseUrl: 'https://{0}.com/'
baseUrl: "https://{0}.com/",
},
//...
}
};
```

After the configuration above, if your app runs on the `mytenant.com`, the app will get the tenant name as **mytenant**.
Expand All @@ -71,29 +69,28 @@ The **{0}** placeholder can be put to the API URLs in the environment to determi
export const environment = {
//...
application: {
baseUrl: 'https://{0}.mydomain.com/',
baseUrl: "https://{0}.mydomain.com/",
//...
},
oAuthConfig: {
issuer: 'https://{0}.ids.mydomain.com',
issuer: "https://{0}.ids.mydomain.com",
//...
},
apis: {
default: {
url: 'https://{0}.api.mydomain.com',
url: "https://{0}.api.mydomain.com",
},
AbpIdentity: {
url: 'https://{0}.identity.mydomain.com',
url: "https://{0}.identity.mydomain.com",
},
},
}
};
```

> **Important Note:** The `application.baseUrl` and the `{0}` placeholder in the value of the `baseUrl` property are required to be able to get tenant from running URL. Other placeholders in API URLs are optional.
After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `ConfigState` on app initialization as follows:


```js
// environment object in ConfigState

Expand Down Expand Up @@ -128,8 +125,8 @@ The app sends the `__tenant` header that contains the current tenant id on each

## See Also

* [Multi Tenancy in ABP](../../Multi-Tenancy.md)
- [Multi Tenancy in ABP](../../Multi-Tenancy.md)

## What's Next?

- [Confirmation Popup](./Confirmation-Service.md)
- [Managing RxJS Subscriptions](./Subscription-Service.md)
2 changes: 1 addition & 1 deletion docs/en/UI/Angular/Quick-Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ In addition, you can [deploy your application to certain targets using the Angul

## What's Next?

- [Environment](./Environment.md)
- [Environment Variables](./Environment.md)
2 changes: 1 addition & 1 deletion docs/en/UI/Angular/Service-Proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ export class BookComponent implements OnInit {
## What's Next?

- [HTTP Requests](./Http-Requests)
- [Config State](./Config-State.md)
4 changes: 2 additions & 2 deletions docs/en/UI/Angular/Subscription-Service.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Easy Unsubscription for Your Observables
# Managing RxJS Subscriptions

`SubscriptionService` is a utility service to provide an easy unsubscription from RxJS observables in Angular components and directives. Please see [why you should unsubscribe from observables on instance destruction](https://angular.io/guide/lifecycle-hooks#cleaning-up-on-instance-destruction).

Expand Down Expand Up @@ -200,4 +200,4 @@ class DemoComponent implements OnInit {

## What's Next?

- [ListService](./List-Service.md)
- [Working with Lists](./List-Service.md)
2 changes: 1 addition & 1 deletion docs/en/UI/Angular/Toaster-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ Removes all open toasts.

## What's Next?

- [Config State](./Config-State.md)
- [Modifying the Menu](./Modifying-the-Menu.md)
4 changes: 2 additions & 2 deletions docs/en/UI/Angular/Track-By-Service.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Easy TrackByFunction Implementation
# Easy *ngFor trackBy

`TrackByService` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.io/guide/template-syntax#ngfor-with-trackby) for its purpose.

Expand Down Expand Up @@ -116,4 +116,4 @@ class DemoComponent {

## What's Next?

- [SubscriptionService](./Subscription-Service.md)
- [Inserting Scripts & Styles to DOM](./Dom-Insertion-Service.md)
Loading

0 comments on commit 1285726

Please sign in to comment.