我已宣布使用州$stateProvider.州看起来像这样:
.state('tabs.chat1', {
url : "/chat/:id",
views : {
'chat1-tab' : {
templateUrl : "templates/chat1.html",
controller : "chatController1"
}
}
Run Code Online (Sandbox Code Playgroud)
在HTML中我有一个链接href="/chat/:{{user._id}}.在浏览器中它工作正常,但是当我在Android设备上运行时告诉我该链接不存在.有任何想法吗?
我有以下代码来定义模式:
var mongoose=require('mongoose');
var Schema=mongoose.Schema;
var PostSchema=new Schema({
location:{type:Array,required:false,select:true}
})
PostSchema.index({location:'2dsphere'});
Run Code Online (Sandbox Code Playgroud)
module.exports=mongoose.model('Post',PostSchema);
我想使位置字段看起来像一个圆(例如:location:{loc:[latitude,longitude],radius:radius})。感谢您的帮助:)