Files
angular__angular/aio/content/examples/attribute-binding/src/app/app.module.ts
T
profanis e8d2348e21 docs: how to create a custom Attribute decorator in a child component and use it from a parent component (#38721)
Aside from using the @input() decorator, we can use the @Attrbitute decorator too.
Of course, those two are different and support different causes.
I expected to see a working example on the Attribute Bindings section, but I didn't find one.
This PR depicts the usage of the Attribute decorator between two components

PR Close #38721
2020-12-08 08:52:25 -08:00

21 lines
579 B
TypeScript

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { CompWithHostBindingComponent } from './comp-with-host-binding.component';
import { MyInputWithAttributeDecoratorComponent } from './my-input-with-attribute-decorator.component';
@NgModule({
declarations: [
AppComponent,
CompWithHostBindingComponent,
MyInputWithAttributeDecoratorComponent
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }