小编Phi*_*las的帖子

凉亭与Bootstrap 3

尝试了Yeoman(1.0.4).生成一个Angular应用程序yo angular; 进入No安装Bootstrap与Sass,因为我想要Bootstrap v 3与LESS.

在脚手架之后,为了获得Bootstrap 3,我输入了:

bower install bootstrap

那将bootstrap安装到bower_components/bootstrap文件夹中.但它没有链接/包含Bootstrap的CSS或JS index.html文件.为什么?

index.html文件确实有来自bower_components文件夹的Angular js文件:

    <!-- build:js scripts/modules.js -->
    <script src="bower_components/angular-resource/angular-resource.js"></script>
    <script src="bower_components/angular-cookies/angular-cookies.js"></script>
    <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
    <script src="bower_components/angular-route/angular-route.js"></script>
    <!-- endbuild -->
Run Code Online (Sandbox Code Playgroud)

但不是bootstrap文件.为什么?我是否必须手动添加/链接到它们?我究竟做错了什么?为我的应用程序生成脚手架后,如何添加Bootstrap ?

angularjs bower twitter-bootstrap-3

7
推荐指数
1
解决办法
6043
查看次数

CF8与CF10:在父函数中声明的局部范围在子函数中不可见

我为ColdFusion 8编写了相当多的代码,在ColdFusion 10中失败.我意识到CF9和更高版本处理"Local"范围的方式与之前不同.我的问题是我编写了扩展每个函数的函数,因为子实例从父类继承变量.但是为了清楚地说明我的意思,让我举一个例子说明CF10的工作原理以及它是如何失败的.

采取两种CFC,一种扩展父CFC的儿童CFC:

<!--- Parent.cfc --->
<cfcomponent displayname="Parent">

    <cffunction name="SomeFunction" output="yes">
        <cfset local.parent_val = "Declared in parent instance">
    </cffunction>

</cfcomponent>



<!--- Child.cfc --->
<cfcomponent displayname="Child" extends="Parent">
    <cffunction name="SomeFunction" output="yes">
    <cfset local.child_val = "Declared in child instance">

    <!--- The following "super" call will instantiate the "parent_val" variable
    from within the parent CFC's version of this function... but only in CF8? --->
    <cfset Super.SomeFunction() />

    <p>#local.child_val#</p>
    <p>#local.parent_val#</p>
    </cffunction>
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)

调用为:

<cfset ChildCFC = CreateObject("component","Child") />
<cfoutput>#ChildCFC.SomeFunction()#</cfoutput>
Run Code Online (Sandbox Code Playgroud)

在CF8中,我得到: Declared in child instance …

coldfusion coldfusion-9 coldfusion-10

4
推荐指数
1
解决办法
410
查看次数