Angular expressions do not allow arbitrary javascript. They are intended to access properties an methods on a scope (not global properties such as navigator). In order to get what you are trying to do to work, you would have to move that logic into a controller method. For example:
$scope.isChrome = function(){ return /chrome/.test(navigator.userAgent.toLowerCase(); } And then use it from your template as: <p ng-hide="isChrome()">you need Chrome! </p> This also makes your template cleaner and easier to understand as well as keeps excessive javascript outside of the dom. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.