。如何使用underscore.strings与我有麻烦underscore.strings与AngularJS工作AngularJs
各地underscore.strings的文档始终显示与我不认为是适当的AngularJS requireJs例子。
我不能与任何这些statments的访问字符串函数,我有点困惑于如何我应该没有requirejs初始化underscore.strings
<script src="/bower_components/underscore/underscore.js"></script>
<script src="/bower_components/underscore.string/dist/underscore.string.js"></script>
<script type="text/javascript">
$(document).ready(function() {
try {
console.log(_); // Returns a reference to Underscore
} catch (e) {
console.log(e);
}
try {
console.log(_s); // Undefined
} catch (e) {
console.log(e);
}
try {
console.log(_.str); // Undefined
} catch (e) {
console.log(e);
}
try {
console.log(_.string); // Undefined
} catch (e) {
console.log(e);
}
});
</script>
强调你能给身边你如何与underscore.string使用它的一些清晰?我已经能够得到undescore.js工作正常,我也用这个角度下划线连接器https://github.com/andresesfm/angular-underscore-module。我真的不明白,您对例子,如何允许我使用underscore.string? – 2015-03-19 01:59:41
工作了,DCMarkie的答案是什么,我一直在寻找 – 2015-03-19 02:09:05