如何在Angular 6或7组件中使用NSwag嵌套Angular Client

时间:2019-07-08 17:35:57

标签: angular asp.net-web-api angular-cli angular-components nswag

我是NSwag和6/7角组件的新手。如何在Angular Components中使用NSwag角客户端(嵌套树对象)?

  1. 使用 NSwag studio ,我从嵌套类C#WebAPI Country -> State -> City Farmer population

  2. 中生成了一个NSwag角客户端。
  3. 使用 Angular CLI 我生成了一个名为CountryFarmers的角度组件。

  4. 在乡村农民中,我有CountryFarmers.Component.ts


    import { Component } from "@angular/core";
    @Component({ selector: "app-root", templateUrl: "./CountryFarmers.component.html", styleUrls: ["./CountryFarmers.component.css"] }) // I tired to paste the code here, I omitted code for brevity export class CountryFarmers{
    title = "CountryFarmers - NSwag Tes"; }

问题:您能否帮助我理解,我如何或在哪里连接并使用CountryFarmers组件中的NSwag生成的客户端。

0 个答案:

没有答案