应用程序开始时绑定到属性

应用程序开始时绑定到属性

本文介绍了应用程序开始时绑定到属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的应用程序首次启动并加载应用程序视图时,我尝试绑定到布尔属性,以便有条件地设置CSS类。布尔属性被正确初始化,但不设置类。启动后绑定似乎工作正常。以下是一个JSFiddle,演示了。任何想法为什么首次运行失败?

When my application first starts up and the application view loads, I attempt to bind to boolean attributes in order to conditionally set a CSS class. The boolean attributes are initialized properly but the class does not get set. The binding seems to work fine after the startup. Here is a JSFiddle that demonstrates the issue. Any ideas why this fails the first-time it runs?

推荐答案

我从GitHub的ember.js团队收到了一个答案。

I received an answer from the ember.js team on GitHub.

这是Kristofor Selden的回应...

Here's the response from Kristofor Selden...

这篇关于应用程序开始时绑定到属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 04:03