试着*ngFor像这样在html中运行.但是,这个错误出现了.
Property binding ngForIn not used by any directive on an embedded template
Run Code Online (Sandbox Code Playgroud)
这是html代码:
<ion-card *ngFor="#media in medias">
Run Code Online (Sandbox Code Playgroud)
我在之前的项目中也发生了这种情况,仍在弄清楚它.有线索吗?
仍然是Ionic2和Angular2的新手.
例如,我目前正在调用从 Angular 2 的 HTTP 返回的 Observable 的取消订阅。
但是我有一些围绕它的自定义逻辑。
是否可以向已经存在的 Observable 添加自定义拆卸逻辑,例如从 Angular 2 的 HTTP 返回的那个?
可能类似于 Observable.prototype.whenUnsubscribed(customTeardownLogic) 的东西?