[keycloak-dev] any ideas on this angular problem?

Stian Thorgersen stian at redhat.com
Tue Aug 13 06:13:00 EDT 2013


http://jsfiddle.net/ukAc5/38/

----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: keycloak-dev at lists.jboss.org
> Sent: Thursday, 8 August, 2013 12:55:11 AM
> Subject: [keycloak-dev] any ideas on this angular problem?
> 
> I couldn't get the simple select box [1] example working as-is within
> the admin gui.  I had to do this:
> 
>      $scope.selection = {
>          colors : [
>              {name:'black', shade:'dark'},
>              {name:'white', shade:'light'},
>              {name:'red', shade:'dark'},
>              {name:'blue', shade:'dark'},
>              {name:'yellow', shade:'light'}
>          ],
>          color : null
>      };
> 
>      $scope.changeApplication = function() {
>          console.log('ApplicationListCtrl.changeApplication() - ' +
> $scope.selection.color.name);
>      };
> 
> 
> and this:
> 
> <select ng-change="changeApplication()" ng-model="color"
> ng-options="c.name for c in colors">
> 
> If I implemented it the same way as the example, "color" would always
> remain 'red'.  Any ideas?  Maybe I'm losing my mind...
> 
> [1] http://code.angularjs.org/1.0.7/docs/api/ng.directive:select
> 
> 
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> 


More information about the keycloak-dev mailing list