Base 64 encoding for angular