本文整理汇总了TypeScript中collections/links.Links.insert方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Links.insert方法的具体用法?TypeScript Links.insert怎么用?TypeScript Links.insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collections/links.Links
的用法示例。
在下文中一共展示了Links.insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: loadLinks
export function loadLinks() {
if (Links.find().count() === 0) {
var links = [
{
"url" : "https://soundcloud.com/shigoosh/hey-baby-stephen-marley-feat-tupac-mos-def",
"nbClick" : 0,
'public': true
},
{
"url" : "http://www.youtube.com/watch?v=W4ATOCCyB2w",
"nbClick" : 3,
'public': true
},
{
"url" : "http://www.dailymotion.com/video/xryxme_sofiane-dingue-de-toi-nabi-nabila-clip-officiel_music",
"nbClick" : 2,
'public': true
},
{
"url" : "https://soundcloud.com/elliegoulding/tessellate-alt-j-cover",
"nbClick" : 5,
'public': true
},
{
"url" : "https://soundcloud.com/slowmagic/moon",
"nbClick" : 6,
'public': true
},
{
"url" : "https://www.youtube.com/watch?v=l_E9g4DVbRM",
"nbClick" : 0,
'public': true
},
{
"url" : "http://www.youtube.com/watch?v=KDBfkgcDwAI",
"nbClick" : 2,
'public': true
},
{
"url" : "http://www.youtube.com/watch?v=o2b2Xh4yFAs",
"nbClick" : 1,
'public': true
},
{
"url" : "http://www.youtube.com/watch?v=bpOSxM0rNPM",
"nbClick" : 3,
'public': true
},
{
"url" : "https://soundcloud.com/edbangerrecords/sebastian-h-a-l",
"nbClick" : 0,
'public': true
},
{
"url" : "https://www.youtube.com/watch?v=Sfou7a-nYEE",
"nbClick" : 1,
'public': true
}
];
for (var i = 0; i < links.length; i++) {
Links.insert(links[i]);
}
}
};