小编Bha*_*vik的帖子

删除由角度组件创建的主机HTML元素选择器

在角度2中,svg-rect是一个创建rect的组件,如下所示,

<svg height="550" width="450" x="0" y="0">
    <g id="svgGroup">
        <svg-rect>
        <!--template bindings={}-->
            <rect x="10" y="10" height="100" width="100" fill="red" stroke="#000" stroke-width="2"></rect>
        <!--template bindings={}-->
        </svg-rect>
        <svg-rect>
        <!--template bindings={}-->
            <rect x="10" y="10" height="100" width="100" fill="red" stroke="#000" stroke-width="2"></rect>
        <!--template bindings={}-->
        </svg-rect>
    </g>
</svg>
Run Code Online (Sandbox Code Playgroud)

但由于创建了特殊元素标签,因此不会呈现rect.如果删除了svg-rect标签,则会呈现rect

<svg height="550" width="450" x="0" y="0">
    <g id="svgGroup">
        <!--template bindings={}-->
        <rect x="10" y="10" height="100" width="100" fill="red" stroke="#000" stroke-width="2"></rect>
        <!--template bindings={}-->
        <!--template bindings={}-->
        <rect x="10" y="10" height="100" width="100" fill="red" stroke="#000" stroke-width="2"></rect>
        <!--template bindings={}-->
    </g> …
Run Code Online (Sandbox Code Playgroud)

svg angular

41
推荐指数
5
解决办法
2万
查看次数

'Owin.IAppBuilder'不包含'MapSignalR'的定义

错误

'Owin.IAppBuilder'不包含'MapSignalR'的定义,也没有可以找到接受类型'Owin.IAppBuilder'的第一个参数的扩展方法'MapSignalR'(你是否缺少using指令或汇编引用?)

using Microsoft.Owin;
using Owin;

[assembly: OwinStartup(typeof(SignalRChat.Startup))]
namespace SignalRChat
{
    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            // Any connection or hub wire up and configuration should go here
            app.MapSignalR();
        }
    }
}  
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激...

更新

signalR版本2.0.3
Microsoft Owin版本2.0.2
Owin版本1.0.0
Visual Studio 2012

asp.net signalr owin

28
推荐指数
3
解决办法
5万
查看次数

selectize.js和jquery验证

我正在尝试验证使用selectize.js选择和jqueryvalidation.org进行验证的表单.

我不能让它发挥作用.该脚本验证输入字段,但不验证选择:

<form id="test" method="post" action="#">
Name: <input name="name" type="text">

<select name="person" id="select-beast" class="demo-default" placeholder="Select">
    <option value="">Select...</option>
    <option value="1">First</option>
    <option value="2">Second</option>n>
</select>

    <button type="submit" class="btn btn-primary col-md-12 col-lg-12">Go</button>
</form>
Run Code Online (Sandbox Code Playgroud)

JS:

$('#select-beast').selectize({
    create: true,
    sortField: 'text'
});


// validate signup form on keyup and submit
$("#test").validate({
    errorElement: 'label',
    errorClass: 'error',
    rules: {
        name: {
            required: true
        },
        person: {
            required: true
        }
    },
    messages: {
        name: "Insert name.",
        person: "Insert person.",
    }
});
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/8nVqS/

javascript validation jquery selectize.js

8
推荐指数
2
解决办法
9476
查看次数

如何使身体的最小高度等于screen.height

我的网站在这里我有一个页面关于我们由于内容不足我们无法覆盖屏幕的完整高度.我的页脚开始漂浮在空中..我尝试在字段集中使用min-height进行操作但不幸的是,只有在我更改浏览器或尝试其他系统时,它才能在我的浏览器上运行,问题再次开始...我有尝试过:
CSS

html,body{  
min-height:100%;  
height:100%;  
}  
[id]center_wrapper{  
min-height:100%;  
height:100%; 
}  
Run Code Online (Sandbox Code Playgroud)

使用Javascript

var body1 = document.getElementsByTagName('body')[0];  
console.log(body1);  
body1.style.minHeight = screen.height;  
body1.style.height = screen.height;  
console.log(body1.style.minHeight);  
Run Code Online (Sandbox Code Playgroud)

jQuery的

$('body').css('min-height', screen.height);  
$('body').css('height', screen.height);  
console.log(document.getElementsByTagName('body')[0].style.minHeight);  
Run Code Online (Sandbox Code Playgroud)

虽然使用jQuery和javascript控制台日志它确实显示704px但它不是704px ..我guess可能是因为在创建DOM后发生了更改..

任何帮助..

javascript css jquery height

2
推荐指数
1
解决办法
8454
查看次数

标签 统计

javascript ×2

jquery ×2

angular ×1

asp.net ×1

css ×1

height ×1

owin ×1

selectize.js ×1

signalr ×1

svg ×1

validation ×1