zoukankan      html  css  js  c++  java
  • :: operator

    BuzzController = ($resource) ->
      @userId = 'googlebuzz'
      @Activity = $resource 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
                                      {alt: 'json', callback: 'JSON_CALLBACK'},
                                      {get:{method:'JSONP', params:{visibility:'@self'}}, replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}}

    # :: = 一次向prototype加入多个成员。

    # 原来可以象这样一次性定义多个progotype成员。

    BuzzController:: =

      fetch: -> @activities = @Activity.get userId:@userId
      expandReplies: (activity) -> activity.replies = @Activity.replies userId:@userId, activityId:activity.id


    module.controller 'BuzzController', ['$resource', BuzzController]

  • 相关阅读:
    STM32学习中出现的错误
    原码 反码 补码 移码
    LiauidCrystal
    gpio 的配置
    ARM7探究
    导轨控制问题
    A4988驱动42步进电机
    arduino驱动oled
    计算机组成原理
    arduino basic issue
  • 原文地址:https://www.cnblogs.com/chaosim/p/3354500.html
Copyright © 2011-2022 走看看