See documentation and examples here from angular.
angularjs.org $location
First implement your controller properly then you need to use the $location service like the following
myApp.controller("MyCtrl" ,["$scope","$window","$location", function($scope, $window, $location){
// Your controller code here.....
$scope.url = $location.absUrl();
}]);
You can use $location.path(); to just get the last part of url or $location.absUrl(); to get the whole thing. Please read the linked documentation.
I edited the jsfiddle here https://jsfiddle.net/hth8sm5y/3/
EDIT: As others have said there was also a typo in your code
"location" so fixing the typo fixes your code using $window. I'm not
sure what your usage is but I suggested $location because it allows
quick access to certain parts on the url like path() and hash() and
also provides both getter/setter.
$locationservice and routers add more available data objectslocation