Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Dropdown selection for datapoint values
-
Ok, I'm gonna be clever...
<md-select ng-model="serialID" ng-required="true" > <md-option ng-repeat="(index,serial) in serials" ng-value="index" > {{serial.value}} </md-option> </md-select> <div ng-if="serialID==(serials.length-1)"> <ma-now update-interval="15 MINUTES" output="time"></ma-now> <ma-point-values point-xid="DP_bf4e8b98-ff25-439c-a63e-4af21bc92902" point="point1" values="point1Values" from="serials[serialID].timestamp" to="time" ></ma-point-values> </div> <div ng-if="serialID<(serials.length-1)"> <ma-point-values point-xid="DP_bf4e8b98-ff25-439c-a63e-4af21bc92902" point="point1" values="point1Values" from="serials[serialID].timestamp" to="serials[(serialID+1)].timestamp" ></ma-point-values> </div>Using Ng-if will create these elements provided one of the if statements are met. Using the index allows us to make this list grow wholly depending on the number of your serials. If you're on the last serial, it sees we're using the last index and thus uses a ma-now directive to give us the browser time from the serial creation time!
Fox
-
@mattfox
Perfect thats working for meThank you very much Mattfox
-
You're welcome, sorry for the lack of comments. Let me know if there's anything you don't understand after comparing it with the angularJS docs
Fox
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login