Skip to content

Commit

Permalink
docs(icon): switch away from self-closing
Browse files Browse the repository at this point in the history
Custom directives should not be self-closing or void elements. Docs and samples updated to reflect this. See this for more info: angular/angular.js#1953 (comment)
  • Loading branch information
andrewconnell committed Feb 7, 2016
1 parent 8208cd1 commit b5b8171
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/components/icon/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ <h1 class="ms-font-su">Icon Demo | &lt;uif-icon&gt;</h1>
<p>
This markup: <br />
<code>
&lt;uif-icon uif-type="arrowDownLeft" /&gt;
&lt;uif-icon uif-type="arrowDownLeft"&gt;&lt;/uif-icon&gt;
</code>
</p>

<p>
Renders this:
<br />
<uif-icon uif-type="arrowDownLeft" />
<uif-icon uif-type="arrowDownLeft"></uif-icon>
</p>

<h2>Modifiers</h2>
<p>
Change the size &amp; color using standard CSS sizing techniques: <code>style="font-size:32px; color:red;"</code>:<br />
<uif-icon uif-type="arrowDownLeft" style="font-size:32px; color:red;" />
<uif-icon uif-type="arrowDownLeft" style="font-size:32px; color:red;"></uif-icon>
</p>

<h2>Changing the Icon</h2>
Expand All @@ -51,7 +51,7 @@ <h2>Changing the Icon</h2>

<div>
Selected icon = <code>{{selectedIcon}}</code><br />
Rendered icon = <uif-icon uif-type="{{selectedIcon.id}}" />
Rendered icon = <uif-icon uif-type="{{selectedIcon.id}}"></uif-icon>
</div>
</div>

Expand All @@ -60,10 +60,10 @@ <h2>Errors When Unsupported Icons Specified</h2>
Wouldn't you like to see an error when you specify an icon that's not supported? Open the JavaScript console to see an error for an icon like this: <br />

<code>
&lt;uif-icon uif-type="ngOfficeUiFabric" /&gt;
&lt;uif-icon uif-type="ngOfficeUiFabric"&gt;&lt;/uif-icon&gt;
</code>

<uif-icon uif-type="ngOfficeUiFabric" />
<uif-icon uif-type="ngOfficeUiFabric"></uif-icon>
</p>

</body>
Expand Down
2 changes: 1 addition & 1 deletion src/components/icon/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<uif-icon uif-type="arrowDownLeft" />
<uif-icon uif-type="arrowDownLeft"></uif-icon>
2 changes: 1 addition & 1 deletion src/components/icon/demoTypeScriptUsage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2>Changing the Icon</h2>

<div>
Selected icon = <code>{{controller.selectedIcon}}</code><br />
Rendered icon = <uif-icon uif-type="{{controller.selectedIcon}}" />
Rendered icon = <uif-icon uif-type="{{controller.selectedIcon}}"></uif-icon>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/icon/iconDirective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IconEnum} from './iconEnum';
* @module officeuifabric.components.contextualmenu
*
* @description
* This is the scope used by the `<uif-icon />` directive.
* This is the scope used by the `<uif-icon>` directive.
*
* @property {string} uifType - Icon to display. Possible types are defined in {@link IconEnum}.
*/
Expand Down Expand Up @@ -44,7 +44,7 @@ class IconController {
*
* @usage
*
* <uif-icon uif-type="arrowDownLeft" />
* <uif-icon uif-type="arrowDownLeft"></uif-icon>
*/
export class IconDirective implements ng.IDirective {

Expand Down

0 comments on commit b5b8171

Please sign in to comment.