I have a url www.myurl.com/angularjs?var=myvar
I am just starting off with AngularJS (and javascript to be honest) and am trying to get the value of 'var' and pass it to my controller but I have no idea how to access the url variables
This is my controller...
vdApp.controller('ApplicantCtrl', ['$scope', '$http', function($scope, $http) {
$http.post('http://www.myurl.com/services', iWantToPassMyDataHere).success(function(data)
{
$scope.results = data;
});
}]);
How can I do this?
Thanks
$routeParams.myVariableName.