将数据从ASP.NET Webmethod传递到Angular 2

将数据从ASP.NET Webmethod传递到Angular 2,asp.net,angular,data-binding,Asp.net,Angular,Data Binding,各位好,飞越者, 抱歉,如果这是重复的,我真的试图找到一个简单的答案,但我不能 我需要将ASP.NET Webmethod中的一些数据传递给我的Angular 2类。 我从一个非常简单的字符串“hello”开始。 如何使用服务器端的Get()方法填充值值 My.NET服务器端代码: [WebMethod] public static string Get() { return "Hello Koby"; } 我的Angular 2代码(非常简化): 从'angular2/core'导入{

各位好,飞越者, 抱歉,如果这是重复的,我真的试图找到一个简单的答案,但我不能

我需要将ASP.NET Webmethod中的一些数据传递给我的Angular 2类。 我从一个非常简单的字符串“hello”开始。 如何使用服务器端的
Get()
方法填充

My.NET服务器端代码:

[WebMethod]
public static string Get()
{
   return "Hello Koby";
}
我的Angular 2代码(非常简化):

从'angular2/core'导入{Component};
从'angular2/core'导入{Injectable};
从'angular2/HTTP'导入{HTTP_提供者、HTTP、响应、头、请求选项};
@组成部分({
选择器:“日志”,
templateUrl:“/Scripts/Angular2/templates/log.html”
})
导出类日志{
私有http;
值=//
import {Component} from 'angular2/core';
import {Injectable} from 'angular2/core';
import {HTTP_PROVIDERS, Http, Response, Headers, RequestOptions} from 'angular2/http';

@Component({
    selector: 'log',
    templateUrl: '/Scripts/Angular2/templates/log.html'
})

export class Log {    
    private http;
    value = ? // <----- This should come from the server
}