Update angularjs directive and other sample codes.