How can I get parameter from the current URL ?
I have URL http://localhost/admin.brands/edit?brandid=1&brandname=samsung&isactive=1. For instance, how can I get brandid from the URL ?
I will modify this:
<script>
var app = angular.module('myApp', [])
.controller("PostsCtrl", function($scope, $http) {
$http.get('http://localhost/admin.brands/getJsonBrandAndEdit?brandid=XX').
success(function(data, status, headers, config) {
$scope.post = data;
}).
error(function(data, status, headers, config) {
});
});
</script>