# For Angular

1. Install the library

   ```
   npm i @aut-labs/d-aut --save
   ```
2. Import the initialization function in the app.component.ts

   ```ts
   import { Init } from '@aut-labs/d-aut';
   ```
3. Call the Init function inside ngOnInit

   ```ts
   ngOnInit(): void { Init(); }
   ```
4. Add the CUSTOM\_ELEMENTS\_SCHEMA in your app.module.ts

   ```ts
   import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
   ```
5. Add the custom HTML tag and populate the partner-key property

app.component.ts:

```ts
import { Component, OnInit } from '@angular/core';
import { Init } from '@aut-labs/d-aut;

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
})
export class AppComponent implements OnInit {
  ngOnInit(): void {
    Init();
  }
  title = 'ngular-app';
}
```

app.module.ts:

```ts
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  declarations: [AppComponent],
  imports: [BrowserModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
```

app.component.ts:

```html
<d-aut dao-expander="0x94C5A2d8B75D139FE02180Fd7Ce87EC55B01b358"></d-aut>
```
