如果我生成一个名为的脚手架"product",当我在编写应用程序时使用它们时,下列内容之间有什么区别?@products,@product,@Product,@Products,Products,Product,product,和products(我敢肯定,这些是不是所有的使用,但它至少应该给什么,我指的想法).
我似乎无法找到每个组合@/大写/多元意味着什么的简单解释.非常感谢帮助.
我有一个ASP.NET MVC Web API,我从$ .ajax()方法调用.从我的API返回正确的JSON,但无法访问该对象.尝试记录"名称"的值时,我的控制台收到的错误是:
未捕获的TypeError:无法读取未定义的属性"名称"
JSON:
[{"id":2,"Name":"thom","Picture":"thom.jpg","About":"I'm a guy. This is my profile. Now quit staring and get out of here.","Location":"London"}]
Run Code Online (Sandbox Code Playgroud)
jQuery的:
$.ajax({
cache:false,
type: 'GET',
dataType: 'json',
url: 'http://localhost:3235/Users/searchUsers?callback=?&searchString=' + searchString,
complete: function (data) {
console.log(data[0].Name);
}
});
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激.谢谢!