{"action":"created","issue":{"url":"https://api.github.com/repos/OptimalBPM/angular-schema-form-dynamic-select/issues/5","labels_url":"https://api.github.com/repos/OptimalBPM/angular-schema-form-dynamic-select/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/OptimalBPM/angular-schema-form-dynamic-select/issues/5/comments","events_url":"https://api.github.com/repos/OptimalBPM/angular-schema-form-dynamic-select/issues/5/events","html_url":"https://github.com/OptimalBPM/angular-schema-form-dynamic-select/issues/5","id":68270374,"number":5,"title":"Passing scope variable to http post ","user":{"login":"ravivit9","id":3435829,"avatar_url":"https://avatars.githubusercontent.com/u/3435829?v=3","gravatar_id":"","url":"https://api.github.com/users/ravivit9","html_url":"https://github.com/ravivit9","followers_url":"https://api.github.com/users/ravivit9/followers","following_url":"https://api.github.com/users/ravivit9/following{/other_user}","gists_url":"https://api.github.com/users/ravivit9/gists{/gist_id}","starred_url":"https://api.github.com/users/ravivit9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravivit9/subscriptions","organizations_url":"https://api.github.com/users/ravivit9/orgs","repos_url":"https://api.github.com/users/ravivit9/repos","events_url":"https://api.github.com/users/ravivit9/events{/privacy}","received_events_url":"https://api.github.com/users/ravivit9/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-04-14T05:57:19Z","updated_at":"2015-04-17T05:25:05Z","closed_at":null,"body":"Hello,\r\n\r\nNow I am able to get the drop down values from mysql db via php using url http post method.  Only issue is how to pass dynamic parameter i.e. passing a scope variable's value to the middleware program in this case to php.\r\n\r\nI have hard coded the user id within the form declaration using \"parameter\" but I would like to use a scope variable (without $scope in the below syntax).\r\n\r\nFor example:\r\n\"parameter\": { \"id\" : \"CURRENT_USER_ID\"} // Where CURRENT_USER_ID is a scope variable.\r\n\r\n    {\r\n      \"key\": \"org_id\",\r\n      \"type\": \"strapselectdynamic\",\r\n      \"options\": {\r\n        \"http_post\": {\r\n          \"url\" : \"app/server/profiledata/my_organisations.php\",\r\n          \"parameter\": { \"id\" : \"416d0817-43fb-11e4-9e1f-f04da275143b\"}\r\n        }\r\n      },\r\n      \"placeholder\": \"Select Organisation Name\",\r\n      \"htmlClass\":\"col-lg-4 col-md-4\"\r\n    }\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OptimalBPM/angular-schema-form-dynamic-select/issues/comments/93895810","html_url":"https://github.com/OptimalBPM/angular-schema-form-dynamic-select/issues/5#issuecomment-93895810","issue_url":"https://api.github.com/repos/OptimalBPM/angular-schema-form-dynamic-select/issues/5","id":93895810,"user":{"login":"ravivit9","id":3435829,"avatar_url":"https://avatars.githubusercontent.com/u/3435829?v=3","gravatar_id":"","url":"https://api.github.com/users/ravivit9","html_url":"https://github.com/ravivit9","followers_url":"https://api.github.com/users/ravivit9/followers","following_url":"https://api.github.com/users/ravivit9/following{/other_user}","gists_url":"https://api.github.com/users/ravivit9/gists{/gist_id}","starred_url":"https://api.github.com/users/ravivit9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravivit9/subscriptions","organizations_url":"https://api.github.com/users/ravivit9/orgs","repos_url":"https://api.github.com/users/ravivit9/repos","events_url":"https://api.github.com/users/ravivit9/events{/privacy}","received_events_url":"https://api.github.com/users/ravivit9/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T05:25:05Z","updated_at":"2015-04-17T05:25:05Z","body":"The factory function works fine, i just sent the part of the code. The below is the full factory code.  \r\n\r\nWith regards to formatting even though while pasting the formatting is there but after saving it's loosing it's format.\r\n\r\n\r\nangular.module('myApp')\r\n    .factory('DataFactory', function($http, $q, AppFactory) {\r\n        this.DataFactory = function() {\r\n\r\n                //THE self.getData function here as ABOVE CODE\r\n\r\n        };\r\n        return new this.DataFactory();\r\n    });\r\n\r\nBy doing this way I can have multiple factory functions within the DataFactory.\r\n\r\nPlease find the below screenshot where console.log prints the data I believe this log is being printed within dynamic select as I am not printing anywhere.\r\n![sectors](https://cloud.githubusercontent.com/assets/3435829/7196479/77734fa8-e4ca-11e4-86db-1616ab1fdf9e.png)\r\n"}}