如何用Coffeescript进行休息

时间:2014-09-01 13:20:13

标签: ajax angularjs rest coffeescript

我有一个angularjs模块如下(控制器)

'use strict';

angular.module('app.controllers', [])

# overall control
.controller('AppCtrl', [
    '$scope', '$location'
    ($scope, $location) ->
        $scope.isSpecificPage = ->
            path = $location.path()
            return _.contains( ['/404', '/pages/500', '/pages/login', '/pages/signin', '/pages/signin1', '/pages/signin2', '/pages/signup', '/pages/signup1', '/pages/signup2', '/pages/lock-screen'], path )

        $scope.main =
            brand: 'ABCD'
            name: 'Brand'

])

我想进行休息调用并获得结果JSON,有没有人有想法,怎么做?

0 个答案:

没有答案