Last active
October 19, 2019 18:02
-
-
Save mak9456/f50ed61079c2c91b4b27fb5710a5d161 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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