我ui-router在Angular项目中使用.为了测试,我正在使用Karma和Jasmine.
运行时Karma,我收到以下错误:
Uncaught TypeError: Cannot read property 'isDefined' of undefined
at /Applications/MAMP/htdocs/examtesting/js/vendor/angular-ui-router.min.js:7
Run Code Online (Sandbox Code Playgroud)
我如何通过这个?
这是整个终端:
patrickreck@Patricks-MacBook-Pro /A/M/h/examtesting> karma start karma.conf.js
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 35.0.1916 (Mac OS X 10.9.2)]: Connected on socket xtivwYEP-4sBQAeAlsMl with id 73870853
Chrome 35.0.1916 (Mac OS X 10.9.2) ERROR
Uncaught TypeError: Cannot read property 'isDefined' of undefined
at /Applications/MAMP/htdocs/examtesting/js/vendor/angular-ui-router.min.js:7
Run Code Online (Sandbox Code Playgroud) 我正在尝试为消息系统创建一个按钮,以便在有新消息时显示橙色点.但是,我无法让它发挥作用.可能吗?
这是按钮
<input type="button" value="Messages •" />?
Run Code Online (Sandbox Code Playgroud)
如果有人想尝试的话,jsFiddle上的按钮:-)
我有一个侧边栏position: fixed.在这个侧边栏里面,我有一个.list我想要使用的地方overflow: scroll.但是,它并不像我想要的那样工作.
HTML
<div id="side">
Stuff
<div id="list">
<div class="item">An item</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
#side {
width: 20%;
height: 100%;
background-color: red;
position: fixed;
}
#list {
width: 100%;
background-color: yellow;
overflow: scroll;
}
.item {
padding: 10px;
}
Run Code Online (Sandbox Code Playgroud)
JSFiddle的问题:http://jsfiddle.net/wGE9W/(黄色list不会滚动)
我有一个空接口,我已经解析了一些json数据.
type Event interface {
}
Run Code Online (Sandbox Code Playgroud)
截至目前,唯一的值是name,并且正确设置.但是,我无法弄清楚如何实际检索此变量的值.我怎么做?
我试过使用HTML5 window.history.pushState函数,但我不能让它工作.
这是功能:
function changeUrl() {
window.history.pushState(object, "Title", "?side=annoncer&sletid=1");
}
Run Code Online (Sandbox Code Playgroud)
这是应该调用它的链接:
<a href="javascript:void(0);" onClick="changeUrl();">
Run Code Online (Sandbox Code Playgroud)
我做错了什么?
css ×2
javascript ×2
angular-ui ×1
angularjs ×1
encoding ×1
go ×1
html ×1
html5 ×1
jasmine ×1
json ×1
karma-runner ×1