<?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[initializing an input of type=text]]></title><description><![CDATA[<p dir="auto">Im trying to put the name property of an array into an input box . The array is same one used to supply data points to a serial chart. it works fine</p>
<p dir="auto">my code:<br />
&lt;input type="text" ng-model="ch1Name" ng-init="ch1Name={{points[0].name}}" size="10" &gt;</p>
<p dir="auto">if i use  {{points[0].name}}  just by itself in a &lt;div&gt; it does display the name property but i want it in an input box.</p>
]]></description><link>https://forum.mango-os.com/topic/4721/initializing-an-input-of-type-text</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 06:15:59 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4721.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 23 Feb 2020 08:19:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to initializing an input of type=text on Mon, 24 Feb 2020 06:02:30 GMT]]></title><description><![CDATA[<p dir="auto">Might be because the second way needs the init outside in another element... probably a parent div. I usually use the first way myself, as I write and map everything in my own controllers.<br />
At least you're learning, that's the main thing!</p>
]]></description><link>https://forum.mango-os.com/post/24776</link><guid isPermaLink="true">https://forum.mango-os.com/post/24776</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Mon, 24 Feb 2020 06:02:30 GMT</pubDate></item><item><title><![CDATA[Reply to initializing an input of type=text on Mon, 24 Feb 2020 05:59:12 GMT]]></title><description><![CDATA[<p dir="auto">Thanks MattFox,</p>
<p dir="auto">I had success using #1 in your reply.  I hadnt thought of that.</p>
<p dir="auto">I cannot get  solution #2 to work. I had focused my energy on that way and should have used solution #1</p>
]]></description><link>https://forum.mango-os.com/post/24775</link><guid isPermaLink="true">https://forum.mango-os.com/post/24775</guid><dc:creator><![CDATA[dgm]]></dc:creator><pubDate>Mon, 24 Feb 2020 05:59:12 GMT</pubDate></item><item><title><![CDATA[Reply to initializing an input of type=text on Sun, 23 Feb 2020 18:59:32 GMT]]></title><description><![CDATA[<p dir="auto">Inputs in angularJS use ng-model, a directive for handling data to/from inputs. As this is an angular issue I feel you should go and read angularJS tutorials, you'll see how everything works together.<br />
The Docs: <a href="https://docs.angularjs.org/api" rel="nofollow ugc">https://docs.angularjs.org/api</a><br />
I'll show you how to do this one.</p>
<p dir="auto">There are two ways:</p>
<ol>
<li>Map the variable of the input to be the same as the point.</li>
</ol>
<pre><code>&lt;input ng-model="points[0].name"  id="pt1name" type="text" /&gt;
</code></pre>
<ol start="2">
<li>use ng-init to set the value of the input textbox on load:</li>
</ol>
<pre><code>&lt;input type="text" ng-model="point1Name"  ng-init="point1Name=point[0].name" /&gt;

</code></pre>
<p dir="auto">You don't need {{}} inside the attribute because it's an angularJS directive. Look in the browser console and you'd likely see a bunch of errors.</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/24774</link><guid isPermaLink="true">https://forum.mango-os.com/post/24774</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Sun, 23 Feb 2020 18:59:32 GMT</pubDate></item></channel></rss>