title: How to access component value from another component with Angular 7
body: <p>I used this code to access the 'address' value from component, StripeComponent, to CreditCardComponent.  I get an empty value for address instead of the actual value in StripeComponent</p>
  
  <p>Here is my child code in CreditCardComponent:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { StripeComponent} from '../stripe/stripe.component';
  
  @Component({
    providers: [StripeComponent],
    selector: 'app-creditcard',
    templateUrl: './creditcard.component.html',
    styleUrls: ['./creditcard.component.css']
  })
  export class CreditCardComponent implements OnInit {
  
    @Input() address : Address;
    @Input('address') ccAddress: Address;
  
    constructor(private creditCardService: CreditCardService,
  
    public stripeScriptTag: StripeScriptTag) {
      this.stripeScriptTag.setPublishableKey( this.publishableKey )
      this.ccAddress = this.creditCardComponent.ccAddress;
      console.log('this is the ccAddress', this.ccAddress);
  }
  </code></pre>
  
  <p>This is the parent code in StripeComponent</p>
  
  <pre class="lang-js prettyprint-override"><code>public address =
  new Address(
    {
      name:"",
      address_city: "",
      address_line1: "",
      address_line2: "",
      address_state: "",
      address_zip: "",
      address_country: ""
    }
  )
  </code></pre>
  
  <p>This is the Stripecomponent.html code, there is no html for creditcardcomponent.html</p>
  
  <pre><code>&lt;div class = form&gt;
    &lt;form (ngSubmit)="onSubmitAddress()"  class="address" &gt;
  
      &lt;mat-form-field class="name-width-height"&gt;
        &lt;input matInput name="name" 
         type="text" required [(ngModel)]="address.name"
       &gt;
       &lt;mat-placeholder class="placeholder"&gt;Name&lt;/mat-placeholder&gt;
      &lt;/mat-form-field&gt;
  
  
         &lt;button type="submit" mat-raised-button color="primary"class="btn 
       address_form"&gt;Submit&lt;/button&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>