JSFiddle - React, Tailwind, and code Playground

by gabriela b

HTML

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.4.0/ui-bootstrap-tpls.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="http://bazalt-cms.com/assets/ng-table/0.3.1/ng-table.js"></script>
<link rel="stylesheet" href="http://bazalt-cms.com/assets/ng-table/0.3.0/ng-table.css">
<div class="container">
    <div ng-controller="mainCtrl" class="row-fluid">
        <input placeholder="ref" type="text"  typeahead-on-select="setRef2($item)" ng-model="selected" typeahead="item.ref for item in i | filter:$viewValue" />
            <input placeholder="ref2" type="text"  typeahead-on-select="setRef($item)" ng-model="selPcode" typeahead="item.ref2 for item in i | filter:$viewValue" />
            </div>
 
</div>

JavaScript

angular.module('myApp', ['ui.bootstrap'])
    .controller("mainCtrl", function ($scope) {
    $scope.selected = '';
    $scope.i = [{ref2:'B1',ref:'Bull ring'},{ref2:'M1',ref:'Manchester'}];
    $scope.setRef2 = function(placehold) {
  		$scope.selPcode = placehold.ref2;
  	};
        
       $scope.setRef = function(placehold) {
  		$scope.selected = placehold.ref;
  	};
        
});