angular and javascript code storage