JSFiddle - React, Tailwind, and code Playground

by tinyhustlee

HTML

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-sanitize.min.js"></script>
<div ng-app="app">
    <div ng-controller="ctrl">
        <select ng-model="selected">
            <option ng-repeat="o in options" ng-bind-html="getOptionName(o.label)" value="{{o.id}}"></option>
        </select>
        <p>The phone should be selected by default.</p>
    </div>
</div>

JavaScript

var app = angular.module('app', ['ngSanitize']);


app.controller('ctrl', ['$scope', function ($scope) {
$scope.getOptionName = function(text){
	return text + 'aa';
};
    $scope.options = [{
        id: 'BOOK',
        label: 'Books &amp; Stuff'
    }, {
        id: 'TEST',
        label: '&#x260E; Phone'
    }, {
        id: 'PLANE',
        label: '&#x2708 Travel'
    }];

    $scope.selected = $scope.options[1].id;
}]);