angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Odd routerLink behavior, must click to add href attribute... #400

Closed tracker1 closed 8 years ago

tracker1 commented 8 years ago

When I navigate off of the first route to render, the resulting navigation area (Home and BF.Index are effectively the same template), the A elements in the DOM don't have any href attribute, and don't render as links. Once I actually click on one of the two A elements, they then change to links.

This behavior is weird and unexpected. Am I missing something? (NOTE: using babel for es6/7 transpilation, not TypeScript)

Screenshots Here

Here's a clone, with the minimum code for the issue.

I tried to replicate the issue on Plunkr, but wasn't able to replicate the issue, the plunkr version is typescript, couldn't find a babel/es6 version of angular I could use on plunkr...

working: https://plnkr.co/edit/GmEhw9

0x-r4bbit commented 8 years ago

Hi @tracker1 can you please setup a plunk that demonstrates your issue. And please make sure that it's broken down to just what's needed to show the issue. Thanks!

tracker1 commented 8 years ago

It appears to be something to do with babel-polyfill I converted the project to typescript to see if that fixed it.

It wasn't until I removed the reference for babel-polyfill that it started working. I was able to remove it from the JS version (accidentally wiped the .ts version while working on it), the routing works without the polyfill...

Might be worth working with the babel guys to discover why this is happening.

The problem presents itself in babel-polyfill@6.5.0, but is not present in 6.3.14