JSFiddle - React, Tailwind, and code Playground

by Ben Noble

HTML

<html ng-app="ui.bootstrap.demo">
         <div class='container-fluid' ng-controller="TypeaheadCtrl">
                <h4>Country</h4>
                <pre>{{selected.name | json}}</pre>
                <input type="text" ng-model="selected" placeholder ="Select Country" typeahead="Country as Country.name for Country in Country | filter:$viewValue | limitTo:8" class="form-control">
                <h4>State in {{selected.name }}</h4>
        </html>

JavaScript

'angular.module('ui.bootstrap.demo', ['ui.bootstrap']);
angular.module('ui.bootstrap.demo').controller('TypeaheadCtrl', function ($scope, $http) {

    $scope.selected = undefined;
    $scope.Country = [
 { "name": "United Kingdom", "code": "1" },
{ "name": "United States", "code": "2" },
{ "name": "United States Minor Outlying Islands", "code": "3" }
 ];

});'