指令自定义双向绑定过滤器

时间:2017-07-14 00:42:49

标签: html angular typescript ng-bootstrap

我正在尝试创建一个接收参数并且具有持久性的自定义指令,我的问题是我不知道在视图中发送参数时如何应用过滤器。 它应该是那样的。

<ngbd-datepicker-popup 
                    [(fecha)]="contabilidad.feContabilizacion.dsFecha | toDateObject"
                    >
                </ngbd-datepicker-popup>

但浏览器会将以下内容投入控制台

Parser Error: Cannot have a pipe in an action expression at column 43 in [(contabilidad.feContabilizacion.dsFecha | toDateObject)=$event] in ng:///AppModule/ContabilidadComponent.html@11:6 ("
                {{contabilidad.feContabilizacion.dsFecha}}
                <ngbd-datepicker-popup 
                    [ERROR ->][(fecha)]="(contabilidad.feContabilizacion.dsFecha | toDateObject)"
                    >
                </ngbd-datepicker-"): ng:///AppModule/ContabilidadComponent.html@11:6

有人可以伸出援助之手,谢谢。

0 个答案:

没有答案
相关问题