Strange thing I'm trying to do apparently.

Using a button with onClick, I can do a simple Javascript redirect to a 
site.

Using a button with ng-click, I cannot do this same Javascript redirect to 
a site.

What I'm trying to accomplish is a button, which when clicked, will 
redirect to a URL which includes some two-way bind fields, but without the 
use of a custom function in a controller.

ex.

<button 
ng-click="window.open('http://www.site.com/login.jsp?username={{username}}&password={{password}}');">Log
 
In!</button>


Is there any possible way to do this?  ng-click doesn't want to perform any 
variation of a redirect, whereas onClick doesn't want to display my two-way 
binding variables.

I have it working with a controller with a login() function which simply 
builds the URL, but I'd REALLY like to simply this and use angular's 
two-way binding without the controller.

Thanks!


-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to