我们正在尝试使用 Angular 设计一个医疗保健应用程序。对于数据过滤,我们正在创建一个如下图所示的栏:
为了减少代码行,我们在 Typescript 中编写代码,我们正在控制台中检查它是否显示。
我们没有得到预期的输出,也没有显示错误。
任何人都可以解决这个问题吗?
listIndex(){
while (this.i <= 90) {
this.alphabets.push(String.fromCharCode(this.i));
}
console.log(this.alphabets());}
Run Code Online (Sandbox Code Playgroud)
输出:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Run Code Online (Sandbox Code Playgroud)
为了您的参考,我发布了完整的 TS 文件:
import {Component} from '@angular/core';
import {HttpService} from '../../service/http.service';
@Component({
selector: 'patienthtml',
templateUrl: 'app/component/patient/patient.html',
providers: [HttpService]
})
export class PatientComponent{
constructor( private httpService: HttpService ) {
}
//simple call init function on controller …Run Code Online (Sandbox Code Playgroud) 我有 26 个查询来生成最终输出 我想自动化该过程并依次执行所有 26 个查询
如何通过单击按逐步顺序执行所有操作