Skip to content

Instantly share code, notes, and snippets.

@farukyildiz
Last active March 12, 2017 12:42
Show Gist options
  • Save farukyildiz/dd6d0fee08727d1be6192b9e3cff4118 to your computer and use it in GitHub Desktop.
Save farukyildiz/dd6d0fee08727d1be6192b9e3cff4118 to your computer and use it in GitHub Desktop.
Ionic Framework V1 controller get data from to php file...
var ControllerName = (function () {
function ControllerName($rootScope, $http, $stateParams) {
$http.get("http://YOUR URL AND FILE NAME.php?Id=" + $stateParams.id)
.then(function (response) {
$rootScope.dataArray = response.data;
$rootScope.id = $stateParams.id;
});
}
return ControllerName;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment