小编Qui*_*App的帖子

onclick中的字符串插值(Ionic 2 + Angular 2)

简单的问题,我试图在我的Ionic 2应用程序中的"onclick"中传递一个字符串,但它一直给我一个错误.

<button onclick="window.plugins.socialsharing.shareViaWhatsApp(null, null, '{{sound.file}}', null)">Enviar no whats</button>
Run Code Online (Sandbox Code Playgroud)

错误日志

 Can't bind to 'onclick' since it isn't a known native property
Run Code Online (Sandbox Code Playgroud)

syntax-error typescript ionic2 ionic3 angular

2
推荐指数
1
解决办法
627
查看次数

如何在C中停止数组中的重复值

我正在用C创建一个5x5棋盘游戏.我遇到的问题是,当我使用rand()时,它复制了一些数字.如何停止重复和0?

对不起,如果太基本的问题.我是C的新手.

int createboard() {

  int rows;
  int columns;
  int board[5][5];
  int board2[5][5];

  srand(time(NULL));

  for (rows = 0; rows < 5; rows++) {
    for (columns = 0; columns < 5; columns++) {
      randomNumber = rand() % 25;
      board[rows][columns] = randomNumber;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

c

2
推荐指数
1
解决办法
77
查看次数

标签 统计

angular ×1

c ×1

ionic2 ×1

ionic3 ×1

syntax-error ×1

typescript ×1