what does @ mean when you use it in front of a meteor collection?

时间:2016-03-23 06:14:15

标签: javascript meteor

I found this code from yogiben:autoform-map package,

what does @ mean when you use it in front of a meteor collection?

Schemas = {}

@Cities = new Meteor.Collection('cities');

Schemas.Cities = new SimpleSchema
    name:
        type:String
        max: 60

    location:
        type: String
        autoform:
            type: 'map'
            afFieldInput:
                    geolocation: true
                    searchBox: true
                    autolocate: true

Cities.attachSchema(Schemas.Cities)

1 个答案:

答案 0 :(得分:3)

它与Meteor集合无关。代码用CoffeeScript编写。前面的@表示城市是一个全球对象。来自咖啡脚本网站,

  

作为this.property的快捷方式,您可以使用@property。