我想混合語法和管道,但我找不到太多的信息。語法Angular2管道<template>
我已經通過管道部件上添加的管道:[SearchPipe],我命名爲「搜索」的SearchPipe,這裏是我的嘗試:
<template ngFor #item [ngForOf]="Items | Search: Past" #isHeader="first" >
任何幫助將是有益的。 謝謝你們
我想混合語法和管道,但我找不到太多的信息。語法Angular2管道<template>
我已經通過管道部件上添加的管道:[SearchPipe],我命名爲「搜索」的SearchPipe,這裏是我的嘗試:
<template ngFor #item [ngForOf]="Items | Search: Past" #isHeader="first" >
任何幫助將是有益的。 謝謝你們
如果您正在使用Angular2 RC比你必須使用: -
<template ngFor let-item [ngForOf]="Items | Search: Past" let-isHeader="first" >
但使用'let-'僅適用於angular2 RC,可能是@Rodboc使用angular2 beta。 –
是的,也許。但很難知道...... –
正是比你可以把它作爲評論,直到你不確定是不是它@Gunter –
有什麼問題嗎? –