离子2 - 返回[对象,对象]

时间:2017-05-05 20:19:45

标签: angular typescript ionic2

这是我的阵列推送:

import subprocess
import os
a=input(" ")
if(a>0):
   subprocess.call(["php", "write.php"])

Traceback (most recent call last):
   File "D:\PROGRAMS\xamkpp\htdocs\proba.py", line 5, in <module>
     subprocess.call(["php", "write.php"])
   File "C:\Python27\lib\subprocess.py", line 522, in call
     return Popen(*popenargs, **kwargs).wait()
   File "C:\Python27\lib\subprocess.py", line 710, in __init__
     errread, errwrite)
   File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
     startupinfo)
 WindowsError: [Error 2] The system cannot find the file specified

我给navParams一个像这样的页面推送:

let results = this.allExercises[i];
this.dataArray.push(results);

我在我的主页中检索它们,如下所示:

    this.navCtrl.push(HomePage, {
        'exercisesDone': this.dataArray
    });

使用此输出: enter image description here

在我的HTML中,我这样做:

constructor(public navCtrl: NavController, public params:NavParams) {
      if(params.get("exercisesDone")){
        this.exerciseIsDone = params.get("exercisesDone");
        console.log('exerciseDone: ', this.exerciseIsDone);
      }
  }

以此为结果:

  <p>{{ exerciseIsDone }}</p>
  <div *ngFor="let b of exerciseIsDone; let i = index">{{ b }}</div>

如何打印数组的值?

0 个答案:

没有答案