# Simple app failing: just adding some links will make it fail

**URL:** <https://forums.bitovi.com/t/simple-app-failing-just-adding-some-links-will-make-it-fail/661>\
**Category:** DoneJS\
**Created:** [June 21, 2017, 3:27pm UTC](https://forums.bitovi.com/t/simple-app-failing-just-adding-some-links-will-make-it-fail/661 "2017-06-21T15:27:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nriesco](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/nriesco/32/190_2.png) [@nriesco](https://forums.bitovi.com/u/nriesco)\
**Post date:** [June 21, 2017, 3:27pm UTC](https://forums.bitovi.com/t/simple-app-failing-just-adding-some-links-will-make-it-fail/661/1 "2017-06-21T15:27:58Z")

</div>

Hi I have this very simple app that is returning errors and reloading on each click on the links above:

app.js

```auto
import DefineMap from 'can-define/map/';
import route from 'can-route';
import 'can-route-pushstate';

const AppViewModel = DefineMap.extend({
  page: 'string',
  section: 'string',
});

route('{page}', { page: 'home' });
route('{page}/{section}', { section: null });

export default AppViewModel;

```

index.stache

```auto
<html>
<body>
  <can-import from="tracker/app" export-as="viewModel" />
  <a class="navbar-brand" href="/home/any" ">Home</a> <a href="/link1/any ">Link1</a> <a href="/link2/any ">Link2</a>
  <br>Hello world
  {{#switch env.NODE_ENV}}
    {{#case "production"}}
      <script src=" {{joinBase 'steal.production.js'}} "></script>
    {{/case}}
    {{#default}}
      <script src="/node_modules/steal/steal.js "></script>
    {{/default}}
  {{/switch}}
</body>
</html>

```

The error:

 ![](https://canada1.discourse-cdn.com/flex035/uploads/donejs/original/1X/2a4bd08bebb6bbb19289b62f21ee22f07a9550c1.png)

---

<div class="post-metadata">

**Author:** ![justinbmeyer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/justinbmeyer/32/179_2.png) [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Post date:** [June 21, 2017, 5:10pm UTC](https://forums.bitovi.com/t/simple-app-failing-just-adding-some-links-will-make-it-fail/661/2 "2017-06-21T17:10:42Z")

</div>

is it possible to make this a jsbin?

---

<div class="post-metadata">

**Author:** ![nriesco](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/nriesco/32/190_2.png) [@nriesco](https://forums.bitovi.com/u/nriesco)\
**Post date:** [June 21, 2017, 5:58pm UTC](https://forums.bitovi.com/t/simple-app-failing-just-adding-some-links-will-make-it-fail/661/3 "2017-06-21T17:58:09Z")

</div>

> [@nriesco](#):
>
> \<a href="/link1/any "\>Link1\</a\>

I finally found the answer: removing trailing spaces in the urls:

changing `<a href="/link1/any ">Link1</a>` to `<a href="/link1/any">Link1</a>` did the trick.

Thanks
