Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

how to access method of another component #1768

Open
@itshakeel23

Description

@itshakeel23

Hi

I have two different components e.g "search_form" and "search_results". In my "search_form" i have input button and by clicking it, that will call a function "clickMe()" of "search_results" components. how can i do that in Angular Dart?

search_form_component:
<div class="form-group"> <button type="button" class="btn btn-primary" (click)="clickMe()">Search</button> </div>

search_results_component:
class SearchResultsComponent {
void clickMe(){
print("Button clicked.");
}
}

app_component.html:
<search-form></search-form> <search-results></search-results>

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions