Use AngularJS as controller