Closed radvansky-tomas closed 7 years ago
@radvansky-tomas can you make a plunker demo of what you are doing so far?
I am using for my forked version of Angular Ionic Schemaform Decorator: https://github.com/radvansky-tomas/angular-schema-form-ionic
This is more less generic question which you should be able to replicate with any decorator. Lets say that you have basic input text. And you want right next to it display
element bound to same model as is bound to that input.
This is what I am trying to achieve
@radvansky-tomas ok I see, that's clearer for me, so what I would do is pass your model into a property of a directive and have the directive controller handle the update of your model value, you don't have to do it all in the template alone, you can add your own directive or controller to manage your template and pass things to it.
In other words your two separate items may both have code to lookup their parent element for the schema-form details and then share them from there. Does that make sense?
@Anthropic Thank you very much for quick reply, but unfortunately I dont understand :(
Where exactly I can place code to control my elements ? In decorator.js file ? Or you want me to control it from "client" app ?
In the client app, you can add directives/controllers that use your template and the values set in it.
Say you have a tag structure like:
div ng-controller="myslider as vm" sf-model="model" sf-field
slider ng-model="vm.value"
input ng-model="vm.value"
You can have a controller that defines the value to be used in your child elements.
At the end of the day apart from a few values it is not much more than a standard angular template you can do whatever you like to it with the value it gets passed. I'm in Australia so sleep time now sorry.
Sorry It took my a while, I havent use this tool before
@radvansky-tomas sorry I lost track of this, did you sort it out yourself or did you still need me to look at it?
Yes you can close it, i sorted it via sf-model
Great to hear! Thank you :)
Hi I am using 3rd party decorator and I would like to add my own template which is in fact with type = range. Everything works fine.
But next step is to add some label/input to show currently selected value by range control.
I tried different combinations of sf-model, but none of them seems to work. Could you please post me to right direction ?
@json-schema-form/angular-schema-form-lead