limitTo in angular2

时间:2016-03-04 13:42:16

标签: javascript angular

我无法找到如何使用limitTo来切断一个字符串

的任何示例
if(score > highScore){ //Will be true always. Not proper condition.
  highScore =score;
  bestScore = highScore;

  NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
  [prefs setInteger:bestScore forKey:@"bestScore"];
  [prefs synchronize];
}

我尝试了相同但却收到错误: -

using like this:
{{'abcdefg' | limitTo:2:5}}
output:
cde

0 个答案:

没有答案