@Test public void extractsNameFromNgFor() throws Exception { assertThat(extractNameFromNgFor("let item of items")).isEqualTo("items"); assertThat(extractNameFromNgFor("let album of artist.albums")) .isEqualTo("artist.albums"); assertThat(extractNameFromNgFor("let item of items; trackBy: trackByFn")) .isEqualTo("items"); assertThat(extractNameFromNgFor( "let item of items | filter:searchText; trackBy: trackByFn")) .isEqualTo("items"); assertThat(extractNameFromNgFor( "let item of items; let i = index; trackBy: trackByFn")) .isEqualTo("items"); assertThat( extractNameFromNgFor("let item of items; let i = index; let odd = odd")) .isEqualTo("items"); assertThat( extractNameFromNgFor("let item in items; let i = index; let odd = odd")) .isEqualTo(""); }
public static String extractNameFromNgFor(String ngForExpression) { String[] ofSplit = ngForExpression.split(";")[0].split("\\|")[0] .split(" of "); return ofSplit.length == 1 ? "" : ofSplit[1].trim(); }
Expressions { public static String extractNameFromNgFor(String ngForExpression) { String[] ofSplit = ngForExpression.split(";")[0].split("\\|")[0] .split(" of "); return ofSplit.length == 1 ? "" : ofSplit[1].trim(); } }
Expressions { public static String extractNameFromNgFor(String ngForExpression) { String[] ofSplit = ngForExpression.split(";")[0].split("\\|")[0] .split(" of "); return ofSplit.length == 1 ? "" : ofSplit[1].trim(); }  }
Expressions { public static String extractNameFromNgFor(String ngForExpression) { String[] ofSplit = ngForExpression.split(";")[0].split("\\|")[0] .split(" of "); return ofSplit.length == 1 ? "" : ofSplit[1].trim(); }  static String getFirstExpression(String text); static boolean hasExpression(String text); static int getExpressionCount(String text); static String extractNameFromRepeater(String repeaterExpression); static String extractExactRepeater(String repeaterExpression); static String extractNameFromNgFor(String ngForExpression); static String replaceIndexBindingWithFunctionParameter(String text,
			int repeaterCount); static String extractControllerAs(String controllerExpression); }
Expressions { public static String extractNameFromNgFor(String ngForExpression) { String[] ofSplit = ngForExpression.split(";")[0].split("\\|")[0] .split(" of "); return ofSplit.length == 1 ? "" : ofSplit[1].trim(); }  static String getFirstExpression(String text); static boolean hasExpression(String text); static int getExpressionCount(String text); static String extractNameFromRepeater(String repeaterExpression); static String extractExactRepeater(String repeaterExpression); static String extractNameFromNgFor(String ngForExpression); static String replaceIndexBindingWithFunctionParameter(String text,
			int repeaterCount); static String extractControllerAs(String controllerExpression);  }