s

$resource(url,[paramDefaults],[actions],options);

五种默认行为:

{

“get”:{method:“get”},

“save”:{method:“post”}

“query”:{method:“get”,isArray:true}

“remove”:{method:“delete”}

“delete”:{method:“delete”}

}

for in 遍历对象

   遍历数组问题:index是字符串,会遍历属性

   forEach问题:不能return break

for of 遍历数组、类数组、字符串

原文地址:https://www.cnblogs.com/miaolq/p/6178410.html