Error and Warning with angularjs