Repository: angular
Issue: Routing: Preserve trailing slash
Labels: feature,freq2: medium,area: router,hotlist: devrel,state: confirmed,router: URL parsing/generation,P3,feature: under consideration

<!--
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING
-->

**I'm submitting a ...**  (check one with "x")
```
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
<!-- Describe how the bug manifests. -->
A trailing slash at the end of a route is automatically removed. 
1) when you load the initial url e.g. example.com/sub/ into the browser (As part of the normalization in the router the function stripTrailingSlash in packages/common/src/location/location.ts seems to remove the trailing slash. The routing works as long as you do not configure the trailing slash in the corresponding route. The address bar will change from the initial example.com/sub/ to example.com/sub)

2) when we use `<a [routerLink]="'/sub/'">go to sub component</a>` we end up with the resulting HTML/DOM that looks like `<a href="/sub">go to sub component</a>` (The trailing slash gets removed (or maybe ignored is the better word) in the function computeNavigation in packages/router/src/create_url_tree.ts.)


**Expected behavior**
<!-- Describe what the behavior would be without the bug. -->
to 1) The trailing slash in the address bar is not removed and still shows example.com/sub/. We can use a trailing slash in our routes.

to 2) when we use `<a [routerLink]="'/sub/'">go to sub component</a>` we should end up with `<a href="/sub/">go to sub component</a>`

Our intent is to implement the feature request ourselves. Looking at the code however, the change doesn't seem trivial, so it would be nice to get some guidance and feedback on the issue before starting 

**Minimal reproduction of the problem with instructions**
<!--
If the current behavior is a bug or you can illustrate your feature request better with an example, 
please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
-->
We made a repo just to test the behaviour https://github.com/antonkarsten/trailingslash

This issue on stack overflow describes the same (or a similar) requirement http://stackoverflow.com/questions/40840444/angular2-keep-add-trailing-slash

The following issue seems related (same part of the code) but the actual requirement/issue is different (just linking it here for awareness)
#14905

**What is the motivation / use case for changing the behavior?**
<!-- Describe the motivation or the concrete use case -->

Some of the tooling (tracking & analytics) we are using only support URLs with a trailing slash.

**Please tell us about your environment:**
<!-- Operating system, IDE, package manager, HTTP server, ... -->

* **Angular version:** 4.0.0
<!-- Check whether this is still an issue in the most recent Angular version -->

* **Browser:** [all ]
<!-- All browsers where this could be reproduced -->
 
* **Language:** [all]

* **Node (for AoT issues):** `node --version` =