Angular fields binding

Hi. How i can to bind an angular property ( like $scope.appname ) to any object (like this :
{ view: “label”, label: “Login”, align: ‘left’ } ) from JS Controller (i create UI from JS function) ?

Thank’s a lot.

There is no built in way to bind scope vars to the UI configuration.
You can use code like next, but it Is a bit verbose

{ id:"topLabel", view: "label", label: "Login", align: 'left' }

//...

$scope.$watch('myVar', function() {
       $$("topLabel").define("label", $scope.appname);
       $$("topLabel").refresh();
});

Ok. Thank you!