update style and controller with angularjs