<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Getting a point value without an endless loop]]></title><description><![CDATA[<p dir="auto">Hi everyone!<br />
I'm a new worker with Mango and I'm trying to write my own module. I want to get a latest value of a data point, but I found only a way to get a point (not a value). Is there a function to get a value? I tried to find a syntax for the component &lt;ma-get-point-value&gt; but I could not..<br />
My code for getting point is:</p>
<pre><code>$scope.getPoint = (city, block) =&gt;
    {
        maPoint.query({rqlQuery: "eq(tags.City,"+city+")&amp;eq(tags.Block,"+block+")"}).$promise.then((points) =&gt; {
            $scope.blockPoints = points;
        })
        
        document.getElementById("block").innerHTML = $scope.blockPoints[0].xid;
    }
</code></pre>
<p dir="auto">I also tried to get point value through $http.get. I got the value, but my page went into an endless loop.. And I don't understand how to stop it (and why it continues).<br />
My code with $http.get is:</p>
<pre><code>$scope.pointValue = []
$scope.getPrumer = () =&gt;
    {
        $http.get(`https:///localhost:8080/rest/v2/point-values/latest/xid?fields=VALUE&amp;limit=1`).then(response =&gt;
            {
                $scope.pointValue = response.data;
            });
        
        document.getElementById("value").innerHTML = $scope.pointValue[0].value;
    }
</code></pre>
<p dir="auto">Please help me understand what I'm doing wrong.</p>
]]></description><link>https://forum.mango-os.com/topic/5805/getting-a-point-value-without-an-endless-loop</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 00:21:21 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/5805.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Apr 2024 11:43:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Getting a point value without an endless loop on Tue, 16 Apr 2024 15:12:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ms_brunette" aria-label="Profile: ms_brunette">@<bdi>ms_brunette</bdi></a> you're welcome! Always happy to help. Also, my apologies, angular.element(htmlelrnent), I misunderstood the jqlite reference.</p>
<p dir="auto">So HTML string or DOMElement should be the value in the element method. It will return a jQuery object.<br />
<a href="https://docs.angularjs.org/api/ng/function/angular.element" rel="nofollow ugc">https://docs.angularjs.org/api/ng/function/angular.element</a></p>
<p dir="auto">Feel free to post another forum question if you are unable to find a solution via the search box.</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28160</link><guid isPermaLink="true">https://forum.mango-os.com/post/28160</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Tue, 16 Apr 2024 15:12:30 GMT</pubDate></item><item><title><![CDATA[Reply to Getting a point value without an endless loop on Tue, 16 Apr 2024 13:39:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a> Thank you for answering! Actually, I already won this battle, but apparently there is a whole war ahead :D<br />
I didn't understand all the behavior, but I found a working solution for my case.<br />
Regarding your comments - in my environment angular.element('#id') doesn't work by some reasons, and I still don't know how to write maPointValues correctly..<br />
Thanks for the link. I found it very useful!</p>
]]></description><link>https://forum.mango-os.com/post/28159</link><guid isPermaLink="true">https://forum.mango-os.com/post/28159</guid><dc:creator><![CDATA[ms_brunette]]></dc:creator><pubDate>Tue, 16 Apr 2024 13:39:23 GMT</pubDate></item><item><title><![CDATA[Reply to Getting a point value without an endless loop on Mon, 15 Apr 2024 20:29:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ms_brunette" aria-label="Profile: ms_brunette">@<bdi>ms_brunette</bdi></a> here's an old post I wrote highlighting how to make a component with the user module addon<br />
<a href="https://forum.mango-os.com/topic/3720/pop-up-window-face-plate/12?_=1713211779825">https://forum.mango-os.com/topic/3720/pop-up-window-face-plate/12?_=1713211779825</a></p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28158</link><guid isPermaLink="true">https://forum.mango-os.com/post/28158</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Mon, 15 Apr 2024 20:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to Getting a point value without an endless loop on Tue, 16 Apr 2024 15:23:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ms_brunette" aria-label="Profile: ms_brunette">@<bdi>ms_brunette</bdi></a> Welcome to the forum!<br />
In the angular js world, you don't need document.getElementById, you'd use <s>angular.element('#id')</s><br />
<code>angular.element(document.getElementById(id))</code><br />
which is a subset of jquery.</p>
<p dir="auto">Also I'd recommend looking at the docs and examples for using the various directives. Activate it by turning it on in the edit menu under administration then saving.</p>
<p dir="auto">Also, if you know how angular works and are aware of how to make controllers and components use maPoint to do point queries. For values however, use maPointValues.</p>
<p dir="auto">Refer to their github repo for MangoAutomation under the <a href="https://github.com/MangoAutomation/ma-dashboards" rel="nofollow ugc">https://github.com/MangoAutomation/ma-dashboards</a> to see how the services and directives works.</p>
<p dir="auto">If you're still stuck I'll be able to help more in about a day or so</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28157</link><guid isPermaLink="true">https://forum.mango-os.com/post/28157</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Tue, 16 Apr 2024 15:23:40 GMT</pubDate></item></channel></rss>