JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="app">
<div ng-controller="PhonesController">
<form><input ng-model="query"/></form>
<ul>
<li ng-repeat="phone in phones | filter:query">{{phone}}</li>
</ul>
</div>
</div>
JavaScript
angular.module('app', [])
.run(function ($location) {
$location.search('q', 'galaxy'); // simulating the URL having the q parameter
})
.controller('PhonesController', function ($scope, $location) {
$scope.phones = ['Samsung Galaxy S5', 'LG G3', 'Apple iPhone 5S'];
$scope.query = $location.search().q;
})