Skip to content

Instantly share code, notes, and snippets.

@mak9456
Last active October 19, 2019 18:02
Show Gist options
  • Save mak9456/f50ed61079c2c91b4b27fb5710a5d161 to your computer and use it in GitHub Desktop.
Save mak9456/f50ed61079c2c91b4b27fb5710a5d161 to your computer and use it in GitHub Desktop.
import { Component } from '@angular/core';
@Component({
selector: 'app-parent',
template: `
<app-child [childMessage]="parentMessage"></app-child>
`,
styleUrls: ['./parent.component.css']
})
export class ParentComponent{
parentMessage = "message from parent"
constructor() { }
}
@Component({
selector: 'app-child',
template: `
Say {{ message }}
`,
styleUrls: ['./child.component.css']
})
export class ChildComponent {
@Input() childMessage: string;
constructor() { }
}
<aura:component>
<aura:attribute name="parentAttribute" type="String"/>
<c:childComponent childAttribute="{!v.parentAttribute}"/>
</aura:component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment