Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework Ionic run android提供的参数与调用目标的任何签名都不匹配_Ionic Framework_Ionic2_Ionic View_Ionic Popup - Fatal编程技术网

Ionic framework Ionic run android提供的参数与调用目标的任何签名都不匹配

Ionic framework Ionic run android提供的参数与调用目标的任何签名都不匹配,ionic-framework,ionic2,ionic-view,ionic-popup,Ionic Framework,Ionic2,Ionic View,Ionic Popup,我有course-page.ts和course-data.ts。 课程页面从course-data.ts获取数据。 我想用“爱奥尼亚运行android”来构建我的应用程序,但失败了。 它告诉我这个错误 [02:51:30] lint finished in 1.79 s [02:51:39] Error: Error at C:/Users/adirz/myapps/sceSchedule/.tmp/pages/courses-page/courses-page.ngfactory.t

我有course-page.ts和course-data.ts。 课程页面从course-data.ts获取数据。 我想用“爱奥尼亚运行android”来构建我的应用程序,但失败了。 它告诉我这个错误

   [02:51:30]  lint finished in 1.79 s
[02:51:39]  Error: Error at C:/Users/adirz/myapps/sceSchedule/.tmp/pages/courses-page/courses-page.ngfactory.ts:736:29

[02:51:39]  Supplied parameters do not match any signature of call target.
[02:51:39]  Error at C:/Users/adirz/myapps/sceSchedule/.tmp/pages/courses-page/courses-page.ngfactory.ts:761:29
[02:51:39]  Supplied parameters do not match any signature of call target.

[02:51:39]  ngc failed

[02:51:39]  ionic-app-script task: "build"

[02:51:39]  Error: Error
这是我的课程页

> import { Component } from '@angular/core';
import {NavController, LoadingController,AlertController} from 'ionic-angular';

import {CoursesData} from "../../providers/courses-data";
import {course} from "../../models/Course";

/*
  Generated class for the CoursesPage page.

  See http://ionicframework.com/docs/v2/components/#navigation for more info on
  Ionic pages and navigation.
*/
@Component({
  selector: 'page-courses-page',
  templateUrl: 'courses-page.html'
})
export class CoursesPage {
  public semester: string = 'SemA';
 // public coursesA: Array<any> = [];
  public coursesB: Array<any> = [];
  public coursesC:Array<any>=[];
  public department:any;
  public courseSelect: string = '';
  public lectureSelect:string= '';
  public coursesNames:Array<any>=[];
  public LecturesNames:Array<any>=[];
  public LectureCourses:Array<any>=[];
  public loader = this.loadingCtrl.create({
    content: "Please wait...",
    spinner: 'crescent'

  });
  public coursesA:Array<any>=[];
   public coursesAD:Array<any>=[];
  public coursesChose:Array<any>=[];

  constructor(public navCtrl: NavController,private loadingCtrl: LoadingController,public coursesData:CoursesData,public alertCtrl: AlertController) {

  }


  ionViewWillEnter() {
    this.loader.present();
      this.onSemChange(); 
    }
    public getCourses(semester:any){
      this.courseSelect='';
      this.coursesNames=[];
      this.LecturesNames=[];
      this.coursesA=[];
      console.log(semester);
     this.coursesData.LoadData(semester)
        .subscribe(courseList=> {
          courseList.forEach(course=>{
          var newCourse={
               id_course:course.id_course ,
              key_course:course.key_course,
              course_name:course.course_name ,
              course_type:course.course_type ,
              start:course.start ,
              end:course.end ,
              point_course:course.point_course ,
              day:course.Day,
              class:course.class,
              lecture_name:course.lecture_name
          }
            this.coursesA.push(newCourse);
            this.coursesNames.push(course.course_name);
            this.LecturesNames.push(course.lecture_name);
          });
          //this.courseSelect=this.coursesNames[0];
          this.coursesAD=this.coursesA;
          this.coursesNames = this.coursesNames.filter(function(elem, index, self) {
                  return index == self.indexOf(elem);
              })
              console.log(this.coursesA);


               this.loader.dismiss();
               console.log(this.coursesNames);
        // return this.coursesA;

        },err=>{
          console.log(err);
        });
  }



  public onCourseChange(){
    console.log(this.courseSelect);
    this.coursesA=this.coursesAD;
    //getCourses();
  this.coursesChose=[];
  this.LecturesNames=[];
   for (let course of this.coursesA) {
      if (course.course_name==this.courseSelect){
        this.coursesChose.push(course);
        this.LecturesNames.push(course.lecture_name);
        console.log(this.LecturesNames);
      }       
  }
    this.coursesA = this.coursesChose; 
  this.LecturesNames = this.LecturesNames.filter(function(elem, index, self) {
                  return index == self.indexOf(elem);
              })
  console.log(this.LecturesNames);
  console.log(this.coursesChose);
  }

  public onLectureChange(){
      this.coursesA=this.coursesAD;
    //getCourses();
  this.LectureCourses=[];
    for (let course of this.coursesA) {
      if (course.lecture_name==this.lectureSelect){
        this.LectureCourses.push(course);
      }
         this.coursesA = this.LectureCourses;
  }
  }
  public addDep(){}
  public onSemChange(){
   let semester=JSON.stringify({'semester':this.semester});
   console.log(semester);
   this.getCourses(semester);

  }
}
当我尝试在web上运行它时,它工作正常(当我运行“ionic run serve”时),但当我运行“ionic run android”时,它失败了。

Include.tmp/pages/courses page/courses page.ngfactory.ts”文件,这样就很容易找到错误。当调用函数中的参数数量与被调用函数include.tmp/pages/courses page/courses page.ngfactory.ts文件中的参数数量不匹配时,会发生错误“提供的参数与调用目标的任何签名不匹配”,以便很容易找到错误。当调用函数中的参数数量与被调用函数中的参数数量不匹配时,会出现错误“提供的参数与调用目标的任何签名不匹配”
    import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';

/*
  Generated class for the CoursesData provider.

  See https://angular.io/docs/ts/latest/guide/dependency-injection.html
  for more info on providers and Angular 2 DI.
*/
@Injectable()
export class CoursesData {
  public data: any = null;

  constructor(public http: Http) {
    console.log('Hello CoursesData Provider');
  }

      LoadData(data:any){
            let link = "http://adirzoari.16mb.com/selectCourses.php";
            return this.http.post(link,data)
                .map(res => res.json());

      }

    }