0

I have an angularjs module as below ( the controller )

'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'

])

I want to make a rest call and get result JSON , does anyone have idea , how to do this ?

Buminda
  • 615
  • 8
  • 15
  • Possible duplicate: http://stackoverflow.com/questions/13269882/angularjs-resource-restful-example – skalee Sep 01 '14 at 13:22
  • Have you tried google? (The popular search engine) http://benhollis.net/blog/2014/01/17/cleanly-declaring-angularjs-services-with-coffeescript/ – Ali Habibzadeh Sep 01 '14 at 13:46
  • Thx skalee , I tried the way suggested in the tutorial... but had no luck – Buminda Sep 01 '14 at 23:37

0 Answers0