ng-if不在指令范围内更新

时间:2015-10-07 02:45:22

标签: angularjs node.js

我正在尝试从指令中删除操纵<div class= 'container'> <div time ng-model = 'datescope' ng-if="datescopeValue">{{date}}</div> <form role='form' ng-if='element'> <div class='form-group'> <input ng-model='name' class= 'form-control' placeholder= 'username'/> <input ng-model='contents' class= 'form-control' placeholder= 'title'/> <button ng-click= "addComment(name, contents)" class='btn btn-default'>button </button> </div> </form> 的DOM元素。

ng-if = 'element'

HTML ADDED

Here is your code with some slight modifications:

import boto

s3=boto.connect_s3()
c_bucket = s3.create_bucket('yodas')
g_bucket = s3.get_bucket('yodas')
mykey = bucket.new_key('test_key')
mykey.set_contents_from_string('this is test content')


>>> print mykey
<Key: yodas,test_key>

>>> bucket.get_key('test_key')
<Key: yodas,test_key>

即使我将my_bucket = "yodas" my_iam_name = "myuser" my_policy_name = "yodaspolicy" policy_json = '''{ "Statement":[{ "Sid":"RandomStringIdentifier", "Action": [ "s3:DeleteObject", "s3:GetObject", "s3:PutObject" ], "Effect":"Allow", "Resource":"arn:aws:s3:::%s/*" }] }''' % my_bucket response = iam.create_user(my_iam_name) iam.put_user_policy(my_iam_name, my_policy_name, policy_json) 设置为false,也不会动态地从DOM中删除该元素。为什么会这样?

0 个答案:

没有答案