<?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" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[AngularJS - Alexander Development]]></title><description><![CDATA[AngularJS - Alexander Development]]></description><link>https://alexanderdevelopment.net/</link><image><url>https://alexanderdevelopment.net/favicon.png</url><title>AngularJS - Alexander Development</title><link>https://alexanderdevelopment.net/</link></image><generator>Ghost 1.20</generator><lastBuildDate>Fri, 24 Apr 2026 14:21:49 GMT</lastBuildDate><atom:link href="https://alexanderdevelopment.net/tag/angularjs/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Dynamics CRM AngularJS demo solution deep dive - the editor form]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Earlier this week I shared a <a href="https://alexanderdevelopment.net/post/2016/11/07/angularjs-demo-solution-for-dynamics-crm/">sample solution</a> that shows how to build a custom Dynamics CRM data editor with <a href="https://angularjs.org/">AngularJS</a>. As I described in that post, the actual editor relies on three custom web resource components (not including the AngularJS and ES6 promise libraries):</p>
<ol>
<li>index.htm - This is</li></ol></div>]]></description><link>https://alexanderdevelopment.net/post/2016/11/10/dynamics-crm-angularjs-demo-solution-deep-dive-the-editor-form/</link><guid isPermaLink="false">5a5837246636a30001b9785b</guid><category><![CDATA[Microsoft Dynamics CRM]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[AngularJS]]></category><dc:creator><![CDATA[Lucas Alexander]]></dc:creator><pubDate>Fri, 11 Nov 2016 00:10:15 GMT</pubDate><media:content url="https://alexanderdevelopment.net/content/images/2016/11/chrome_2016-11-10_18-04-25.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://alexanderdevelopment.net/content/images/2016/11/chrome_2016-11-10_18-04-25.png" alt="Dynamics CRM AngularJS demo solution deep dive - the editor form"><p>Earlier this week I shared a <a href="https://alexanderdevelopment.net/post/2016/11/07/angularjs-demo-solution-for-dynamics-crm/">sample solution</a> that shows how to build a custom Dynamics CRM data editor with <a href="https://angularjs.org/">AngularJS</a>. As I described in that post, the actual editor relies on three custom web resource components (not including the AngularJS and ES6 promise libraries):</p>
<ol>
<li>index.htm - This is the editor form.</li>
<li>app.js - This contains the JavaScript code that make the editor work.</li>
<li>webapisdk.js - This library enables easy use of the Web API. Its code is taken from the WebAPIBasicOperations.js sample at <a href="https://msdn.microsoft.com/en-us/library/mt770365.aspx">https://msdn.microsoft.com/en-us/library/mt770365.aspx</a>.</li>
</ol>
<p>The index.htm web resource is fundamentally just a regular HTML page, but there are a few additional things that need to be done to enable the Angular functionality. Today I will go through those Angular-specific bits line by line. If you want to follow along, the full code is available on <a href="https://raw.githubusercontent.com/lucasalexander/AlexanderDevelopment.CrmAngularDemo/master/angulardemo/index.htm">GitHub</a>.</p>
<p>Line 2 - <code>&lt;html ng-app=&quot;crmEditorApp&quot;&gt;</code> - This tells AngularJS we have an application named &quot;crmEditorApp.&quot;</p>
<p>Line 25 - <code>&lt;div ng-controller=&quot;CrmEditorController as crmEditor&quot;&gt;</code> - This invokes the controller defined in our app.js file for this div.</p>
<p>Lines 29 - <code>ng-value=&quot;crmEditor.mainrecord.name&quot;</code> and <code>ng-model=&quot;crmEditor.mainrecord.name&quot;</code> - This binds form input values to the Angular variables, and allows us to easily update data in CRM. The ng-value and ng-model also show up on line 31.</p>
<p>Line 32 - <code>&lt;button ng-click=&quot;crmEditor.UpdateRecord()&quot;&gt;Update record&lt;/button&gt;</code> - This creates a button that will execute the controller's UpdateRecord function when it is clicked.</p>
<p>Line 41 - <code>&lt;tr ng-repeat=&quot;task in crmEditor.tasks&quot;&gt;</code> - This creates a table row for every item in the controller's tasks array.</p>
<p>Line 42 - <code>{{task.subject}}</code> - This displays the value of the &quot;subject&quot; property for the specific task object. The same syntax is used on lines 43 and 44.</p>
<p>Line 50 - <code>&lt;input ng-model=&quot;tasksubject&quot; name=&quot;tasksubject&quot; type=&quot;text&quot; id=&quot;tasksubject&quot; /&gt;</code> - The &quot;ng-model&quot; here makes the value of the input available to the controller. The same syntax is used on lines 51 and 52.</p>
<p>Line 53 - <code>&lt;button ng-click=&quot;crmEditor.AddTask()&quot;&gt;Add new task&lt;/button&gt;</code> - This creates a button that will execute the controller's AddTask function when it is clicked.</p>
<p>We'll take a look at the app.js resource in a future post. Until then, happy scripting!</p>
</div>]]></content:encoded></item><item><title><![CDATA[AngularJS demo solution for Dynamics CRM]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Lately I've started using <a href="https://angularjs.org/">AngularJS</a> to build web resources for custom data editors and viewers in Dynamics CRM. Once you get the hang of Angular, it's not that hard, but it did take me some time to figure out exactly how to work with it as part of a CRM</p></div>]]></description><link>https://alexanderdevelopment.net/post/2016/11/07/angularjs-demo-solution-for-dynamics-crm/</link><guid isPermaLink="false">5a5837246636a30001b97857</guid><category><![CDATA[Microsoft Dynamics CRM]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[AngularJS]]></category><dc:creator><![CDATA[Lucas Alexander]]></dc:creator><pubDate>Mon, 07 Nov 2016 13:30:00 GMT</pubDate><media:content url="https://alexanderdevelopment.net/content/images/2016/11/iexplore_2016-11-06_07-13-31.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://alexanderdevelopment.net/content/images/2016/11/iexplore_2016-11-06_07-13-31.png" alt="AngularJS demo solution for Dynamics CRM"><p>Lately I've started using <a href="https://angularjs.org/">AngularJS</a> to build web resources for custom data editors and viewers in Dynamics CRM. Once you get the hang of Angular, it's not that hard, but it did take me some time to figure out exactly how to work with it as part of a CRM solution. To help other people get started using Angular in Dynamics CRM, I've built a <a href="https://github.com/lucasalexander/AlexanderDevelopment.CrmAngularDemo/">demo solution</a> that includes a custom editor page for a custom entity called &quot;demo parent&quot; and its related tasks.</p>
<p>The custom editor displays an existing demo parent record's name and description fields, both of which are editable. It also shows all tasks related to the demo parent and allows the user to add new tasks.</p>
<p>Here's a screenshot of the entity form:<br>
<img src="https://alexanderdevelopment.net/content/images/2016/11/iexplore_2016-11-06_07-52-02.png#img-thumbnail" alt="AngularJS demo solution for Dynamics CRM"></p>
<p>And here's a screenshot of the custom editor (not very stylish, I know):<br>
<img src="https://alexanderdevelopment.net/content/images/2016/11/iexplore_2016-11-06_07-12-45.png#img-thumbnail" alt="AngularJS demo solution for Dynamics CRM"></p>
<p>The editor page is launched from the &quot;open editor&quot; button on the demo parent main form in CRM.</p>
<p>My solution includes the following components:</p>
<ol>
<li>Demo parent (la_demoparent) entity - The custom Angular editor displays and allows updating this type of record.</li>
<li>index.htm web resource - This is the web page for the editor.</li>
<li>app.js - This holds the JavaScript code for the Angular application.</li>
<li>webapisdk.js - This JavaScript library enables easy use of the Web API. Its code is taken from the WebAPIBasicOperations.js sample at <a href="https://msdn.microsoft.com/en-us/library/mt770365.aspx">https://msdn.microsoft.com/en-us/library/mt770365.aspx</a>.</li>
<li>es6promise.min.js - This is a polyfill for ES6-style Promises that's used to work with async code. Promises basically let you avoid callback hell like we had with all the CRM organization data service examples.</li>
<li>openeditor.js - This contains code to open the editor from the demo parent entity ribbon. It is not required by the actual Angular application.</li>
<li>Editor16.png and Editor32.png - These icons aren't required for the actual Angular application to function.</li>
</ol>
<p>One thing that is notably missing from my application is the AngularJS library. My index.htm page is loading it from the Google CDN, but there's no reason you couldn't upload a copy to your CRM organization and call it from there instead.</p>
<p>You can download the <a href="https://github.com/lucasalexander/AlexanderDevelopment.CrmAngularDemo/raw/master/Angulardemo_0_0_0_1.zip">entire solution</a> to install in your own CRM organization from my GitHub repository, or you can just browse the code <a href="https://github.com/lucasalexander/AlexanderDevelopment.CrmAngularDemo/tree/master/angulardemo">here</a>.</p>
<p>I plan to discuss the different parts of the solution in more detail in future posts, but I think just browsing the code and seeing how the solution works will still be helpful to anyone who is just getting started with Angular in CRM.</p>
</div>]]></content:encoded></item></channel></rss>