Open salangar opened 8 years ago
You'll have to recompile the page once the value has loaded. This is an Angular limitation.
Thanks a lot..wanted to confirm that :) Any best practice idea on how to do it?
I haven't done much with Angular recently, so I don't actually remember. It's in the docs, though, and at least one spot in ngDynForms, too.
Thanks! I finally ended up using ng-if for this one to resolve :)
Anyway, is it possible to change the default styles - gap between text label and input and change default color of checked status in radio buttons?
Also, anyway to track reset in my controller, so that once user clicks reset, I want to redirect to cancel page?
Styles are completely CSS; this package doesn't do anything with those.
Look at click
in the README. I think that will provide what you're looking for.
Thanks! I tried - result.push({ "type": "reset", "model": "reset", "label": "Cancel", "callback":clickS() also , ng-click, }); did not help!
You'll want to make sure your function call is quoted, since it gets dropped directly into the markup exactly the way it's retrieved. That means you're setting your ng-click
attribute to the return value of clickS()
, if you aren't quoting it.
Yes, i tried doing it: result.push({ "type": "reset", "model": "reset", "label": "Cancel", "callback":'clickReset' }); and function clickReset(){ console.log("clickReset...") }, its not calling the callback :(
Still need the parentheses. Remember, anything in an attribute is effectively run through eval()
, so a function's name won't be enough. You're not assigning the contents of the attribute directly to a callback; it's more like assigning a wrapper around the attribute's contents.
Thanks you! that worked. Great implementation!
I have the following code:
html:
app.js:
.when('/register', { controller: 'RegisterCtrlr', templateUrl: 'views/register.html', controllerAs: 'register', resolve: { getResolveStatus: getResolveStatus } })
controller: .... deferred = $q.defer();
It loads teh value - {{formTemplate}}}, but, it does not initiklize the template. How to over come it?