NAnt属性:: exists()与新定义的属性?(NAnt property::exists() with newly defined property?)
在NAnt 0.92中,我定义了一个属性,并在检查后立即存在。 它不存在......但它存在于被调用的目标中。 这是一个错误还是一个功能?!? 我在文档中搜索但找不到它。
<target name="test"> <property name="testprop" value="test value" /> <echo message="property value = ${testprop}" /> <if test="${property::exists(testprop)}"> <echo message="property exists, as it should!" /> </if> <if test="${not property::exists(testprop)}"> <echo message="property doesn't exists... WTF?" /> </if> <call target="test2" /> </target> <target name="test2"> <echo message="property value in sub-target = ${testprop}" /> </target>
输出:
测试:
[echo] property value = test value [echo] property doesn't exists... WTF?
测试2:
[echo] property value in sub-target = test value
In NAnt 0.92, I define a property and immediately after checks it's existence. It doesn't exists... but it exists in a called target. Is this a bug or a feature?!? I search in the documentation but could not find a mention of it.
<target name="test"> <property name="testprop" value="test value" /> <echo message="property value = ${testprop}" /> <if test="${property::exists(testprop)}"> <echo message="property exists, as it should!" /> </if> <if test="${not property::exists(testprop)}"> <echo message="property doesn't exists... WTF?" /> </if> <call target="test2" /> </target> <target name="test2"> <echo message="property value in sub-target = ${testprop}" /> </target>
Output:
test:
[echo] property value = test value [echo] property doesn't exists... WTF?
test2:
[echo] property value in sub-target = test value
原文:https://stackoverflow.com/questions/15168112
满意答案
我过去遇到的问题似乎与您的问题有关:如果您通过“templateUrl”包含访问模板的任何指令但由于某些原因,angular无法解析此指令的templateUrl,默认情况下它将返回模板对于index.html,它将再次包含你的指令,并且由于找不到指令的templateUrl,它再次默认为index.html
等等....
这很可能是你的问题
A problem I had in the past that seems related to your issue: If you include whatever directive that access a template through "templateUrl" but for some reasons, angular can't resolve the templateUrl of this directive, by default it will return the template for index.html which will contain again your directive and because the templateUrl for the directive is not found, it default again to index.html
and so on....
This is most likely your issue here
相关问答
更多ng-repeat呼叫控制器功能次数过多(ng-repeat call controller function too many times)
在ng-repeat循环中显示来自不同文件夹的图像(Showing images from different folders inside ng-repeat loop)
angularJS循环到ng-repeat(angularJS loop into ng-repeat)
AngularJS - 在控制器中的ng-repeat undefined内部形成(AngularJS - form inside ng-repeat undefined in controller)
ng-if内部ng-repeat不从控制器更新(ng-if inside ng-repeat not updating from controller)
角度控制器加载但不显示ng-repeat(Angular controller loads but ng-repeat doesn't show)
如何从另一个控制器更新控制器的ng-repeat模型?(How to update the ng-repeat model of controller from another controller?)
ng-repeat中的angular Infinite $ digest循环(angular Infinite $digest Loop in ng-repeat)
ng-repeat导致控制器中出现无限循环。(ng-repeat causing infinite loop in controller. Setting breakpoint show controller code executed infinitely)
使用ng-repeat功能导致无限的摘要循环(Using function with ng-repeat causing infinite digest loop)
相关文章
更多could not find system property or JNDI
mybatis There is no getter for property named 'xx' in 'class java.lang.String
页面获取ACTION的属性,页面不能弹出JS
Java:IO/NIO篇,读写属性文件(properties)
oracle数据库中NOT IN 和 NOT EXISTS为什查不到数据
linux 文件系统详解之文件时间属性
css常用属性
solrcore.properties定义server是否是master
Linux 文件属性详解
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!