Fix some mirror Bug, Move jQuery Code to AngularJS Directive