Safari history bug in Tutorials & ES5/ES6 Tutorials

30 views
Skip to first unread message

Daniel Zen

unread,
May 3, 2016, 1:44:51 PM5/3/16
to ang...@googlegroups.com, ward...@hotmail.com, jo...@johnpapa.net
I've been working on JavaScript ES5/ES6 version for the Tutorials of "Tour of Heroes".

Besides Chrome, I have been spending some time in Safari because it still doesn't support arrow functions and therefore is a good browser to test ES5 code. I spent some time making what I believe is a pure ES5 version of the Tutorial:


and it works fine in Chrome. However, in Safari, I have a problem when I click the "Back" button in the hero-detail.component. It calls window.history.back() at which point it successfully navigates the route, but the state of the component is lost. Not being sure if this was a bug in Safari, or my code, I figured I would try the regular TypeScript version in Safari:


And sure enough, the problem remains. 

On a separate note, I'm still interested in helping write ES5 & ES6 documentation for Angular2, and would love a response to my first pull request.

Daniel Zen

unread,
May 5, 2016, 1:19:21 PM5/5/16
to AngularJS, ward...@hotmail.com, jo...@johnpapa.net
I completed a pure ES6 version using Babel:


babel-core & babel-runtime are mapped automatically by http://jspm.io/system.js

The curious thing is, it has the same history bug as Safari. It successfully navigates the route, but the state of the component is lost. Strange. 

Anyway, I've been trying to offer to write ES5/ES6 documentation, but haven't received any responses yet through any channels. Any suggestions on where I should reach out?

Thanks,
Daniel
Reply all
Reply to author
Forward
0 new messages