An open API service indexing awesome lists of open source software.

https://github.com/billcheng/angular-search-text

Angular Search Text Box for Materialize
https://github.com/billcheng/angular-search-text

angularjs materialize-css

Last synced: 7 months ago
JSON representation

Angular Search Text Box for Materialize

Awesome Lists containing this project

README

          

# angular-search-text
Angular Search Text Box for Materialize

DEMO

# Install
```code
bower install angular-search-text
```

# CSS
```html

```

# Script
```html

```

# Angular module
```javascript
angular.module("yourApp", ["ngSearchText"])
```

# HTML Tag
```html

```

# Example of ng-request function (local)
```javascript
$scope.doSearch = function(deferred, text) {
var result = [];
if (text!=='')
var lowerCaseText = text.toLowerCase();
angular.forEach(searchList, function(s){
if (s.toLowerCase().startsWith(lowerCaseText))
result.push(s);
});

deferred.resolve({data: result});
};
```

# Example of ng-request function (remote)
```javascript
$scope.doSearch = function(deferred, text) {
$http.get("webapi")
.then(function(response){
deferred.resolve({data: response.data});
},
function(response){
deferred.reject(response);
});
};
```