Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Trying to build a angularjs single page web application using SQL Anywhere 16 creating web service. using nginx as a web server.

my problem is in the web service ... I cannot quite get the header created correctly for it to be used by the application. I create two application exactly the same code the difference is one line one pulls from a outside web service that works and mine pulls from Sybase that does not work.

the code that is different

angular.module('', ['ngResource']) .factory('AngularIssues', function($resource){

return $resource('', {})

// return $resource('http://[my ip]:8086/tmws/vb_wot', {})

}) .value('version', '0.1');

i changed the nginx to pull my web service through as proxy eliminating the Same origin Policy however that seems to be the inaccurate error that is showing in the console.

when I run this in the browser inspecting the network I get the line of vb_wot Method OPTIONS I set the Content-Type:application/json; charset=utf-8

I need a proof of concept for a meeting I'm going to. Does anyone has a sample that works with angularjs?

asked 30 Sep '14, 16:57

tandersen's gravatar image

accept rate: 0%

found my sample code took it from a tutorial I stopped at Step 6 replaced the $http.get with my own IP just a note my nginx is using port 8086 and my service is 8084 using nginx proxy to make same location

phonecatApp.controller('PhoneListCtrl', function ($scope, $http) { $http.get('').success(function(data) { $scope.phones = data; });

$scope.orderProp = 'age'; });

Have a proof of concept ... nice, I fly out tomorrow

permanent link

answered 01 Oct '14, 12:12

tandersen's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 30 Sep '14, 16:57

question was seen: 3,396 times

last updated: 01 Oct '14, 12:12