Angular implementation of sharedobject