Skip to content

Instantly share code, notes, and snippets.

Created June 30, 2018 23:17
What would you like to do?
Calling child component's function from parent view
import { Component, ViewChild } from '@angular/core';
import { RandomQuoteComponent } from './random-quote/random-quote.component'
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
export class AppComponent {
private randomQuoteComponent: RandomQuoteComponent;
title = 'Muse';
onClickMe() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment