Skip to content

Instantly share code, notes, and snippets.

@lymanlai
Created May 17, 2015 05:48
Show Gist options
  • Save lymanlai/e8e753fcc0efad9c5efb to your computer and use it in GitHub Desktop.
Save lymanlai/e8e753fcc0efad9c5efb to your computer and use it in GitHub Desktop.
<div ng-controller="MyController" >
<span ng-bind-html-unsafe="myData.textf()"></span>
</div>
<div ng-switch on="myData.switch">
<div ng-switch-when="1">Shown when switch is 1</div>
<div ng-switch-when="2">Shown when switch is 2</div>
<div ng-switch-default>Shown when switch is anything else than 1 and 2</div>
</div>
<div ng-include="'angular-included-fragment.html'"></div>
<div ng-include="myData.showIt && 'fragment-1.html' || 'fragment-2.html'"></div>
<ol>
<li ng-repeat="(name, value) in myData.myObject">{{name}} = {{value}}</li>
</ol>
<input type="checkbox" ng-model="myForm.wantNewsletter" ng-true-value="yes" ng-false-value="no" >
<select ng-model="myForm.car" ng-options="obj.id as obj.name for obj in myForm.options"></select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment