mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
e8d2348e21
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
21 lines
579 B
TypeScript
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 { }
|