我试图弄清楚如何将AngularJS范围变量绑定到CSS语法中.我认为问题在于大括号.这是我基本上要做的事情:
<style>.css_class {background:{{ angular_variable }}; color:#ffffff;}</style>
<style>.css_rule {background:{{ "#000000" }}; color:#ffffff;}</style>
<style>.css_rule {background:{{ var | someFilter }}; color:#ffffff;}</style>
Run Code Online (Sandbox Code Playgroud)
关于如何实现这一点的任何想法?谢谢!
我正在尝试在谷歌计算引擎上部署一个新的 docker 机器,但我不需要太多的资源。只是一个简单的 nginx 服务器。
当我跑步时:
$ docker-machine create --driver google --google-project my-project-name my-machine-name
Run Code Online (Sandbox Code Playgroud)
它工作得很好,但创建了一个n1-standard-1 (1 个 vCPU,3.75 GB 内存)实例,但它的资源比我需要的多得多。我还能够成功创建一个g1-small (1 个 vCPU,1.7 GB 内存)实例。但是当我尝试创建最小的实例f1-micro (1 个 vCPU,0.6 GB 内存)时,它被卡住了Installing docker
我正在使用命令:
$ docker-machine create --driver google --google-project my-project-name --google-machine-type f1-micro my-machine-name
Run Code Online (Sandbox Code Playgroud)
控制台输出:
Running pre-create checks...
(my-machine-name) Check that the project exists
(my-machine-name) Check if the instance already exists
Creating machine...
(my-machine-name) Generating SSH Key
(my-machine-name) Creating host...
(my-machine-name) Opening firewall ports
(my-machine-name) …Run Code Online (Sandbox Code Playgroud)