Last active
March 12, 2017 12:42
-
-
Save farukyildiz/dd6d0fee08727d1be6192b9e3cff4118 to your computer and use it in GitHub Desktop.
Ionic Framework V1 controller get data from to php file...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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