-
-
Save samlinux/814efeccbda49e7968e325ff6f8b620b to your computer and use it in GitHub Desktop.
Angular meets Internet Computer
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'; | |
import { IcService } from './ic.service' ; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
// my title | |
title:string = 'Angular meets IC'; | |
// response to display into the template | |
ic_response:string = ''; | |
// import the service to this component | |
constructor(private icService:IcService){} | |
// service call from the component | |
public async getGreet(name:string){ | |
this.ic_response = await this.icService.greet(name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment