FYI, Angular has a $document service that we could use here. This would help for testing. Not mandatory for now. Just a remark.