angular js initialized and controller with methods created