无法得到智能感知knockout.js文件 [英] unable to get intellisense for knockout.js file

查看:88
本文介绍了无法得到智能感知knockout.js文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的asp.net网站,我们正在使用knockout.js。我不能够获取JavaScript智能感知knowkcout.js文件。我尝试添加下面的代码片段,但仍我没有得到任何智能感知。

 <如果%(假){%GT;
    <脚本SRC =淘汰赛2.0.0.js类型=文/ JavaScript的>< / SCRIPT>
<%}%GT;

这是我的头块的样子:

 <%@页面语言=C#AutoEventWireup =真codeFILE =Default.aspx.cs继承=_默认%GT;<如果%(假){%GT;
    <脚本SRC =淘汰赛2.0.0.js类型=文/ JavaScript的>< / SCRIPT>
<%}%GT;< HTML的xmlns =htt​​p://www.w3.org/1999/xhtml>
<头=服务器>
    <标题>无标题页< /标题>
    <脚本SRC =jQuery的-1.7.1.min.js类型=文/ JavaScript的>< / SCRIPT>
    <脚本SRC =jQuery的-UI-1.8.18.custom.min.js类型=文/ JavaScript的>< / SCRIPT>
    <脚本SRC =json2.js类型=文/ JavaScript的>< / SCRIPT>
    <脚本SRC =淘汰赛2.0.0.js类型=文/ JavaScript的>< / SCRIPT>
    <脚本类型=文/ JavaScript的>
    $(函数(){功能视图模型(){
    的firstName = ko.observable();
    的lastName = ko.observable();}    ko.applyBindings(新视图模型());
 });
    < / SCRIPT>


解决方案

knockoutjs.2.0.0.js 文件,另外一个放在一起 - kcnockoutjs的调试版本淘汰赛2.0.0.debug.js 和Visual Studio将能够挑了智能感知。你并不需要包括LT这个文件中使用&; SCRIPT SRC =.. />

为我工作在Visual Studio 2010中

淘汰赛2.0.0.debug.js - 淘汰赛2.0.0(调试版本)从$ 的C $ CPLEX

i am working on asp.net website and we are using knockout.js. I am not able to get javascript intellisense for knowkcout.js file. I tried adding the below snippet but still i am not getting any intellisense.

<% if(false){ %>
    <script src="knockout-2.0.0.js" type="text/javascript"></script>
<% } %>

This is how my head block looks like:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<% if(false){ %>
    <script src="knockout-2.0.0.js" type="text/javascript"></script>
<% } %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script src="jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
    <script src="json2.js" type="text/javascript"></script>
    <script src="knockout-2.0.0.js" type="text/javascript"></script>
    <script type="text/javascript">


    $(function() {

function viewModel() {
    firstName = ko.observable();
    lastName = ko.observable();

}

    ko.applyBindings(new viewModel());




 });
    </script>

解决方案

Put along with the knockoutjs.2.0.0.js file an other one - debug version of kcnockoutjs knockout-2.0.0.debug.js and Visual Studio would be able pick intellisense up. You do not need including this file using <script src="" .. />.

Works for me on Visual Studio 2010

Download knockout-2.0.0.debug.js — Knockout 2.0.0 (debug build) from CodePlex

这篇关于无法得到智能感知knockout.js文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆