Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thumbtack/angular-smarty
Autocomplete UI written with Angular JS.
https://github.com/thumbtack/angular-smarty
Last synced: 3 months ago
JSON representation
Autocomplete UI written with Angular JS.
- Host: GitHub
- URL: https://github.com/thumbtack/angular-smarty
- Owner: thumbtack
- License: bsd-3-clause
- Created: 2014-03-24T19:07:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-17T23:10:22.000Z (over 10 years ago)
- Last Synced: 2024-08-05T15:03:22.493Z (3 months ago)
- Language: JavaScript
- Size: 307 KB
- Stars: 227
- Watchers: 58
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
angular-smarty
==============Autocomplete UI written with Angular JS.
Installation
---------------------`bower install angular-smarty`
Configuration
---------------------Configuration is handled in smarty-config.js which is injected into the main module in smarty.js.
The main configuration variable is the function getSmartySuggestions that returns a promise
containing the suggestions to be used in the autocomplete dropdown list. The default
getSmartySuggestions uses a url endpoint for a backend service that returns suggestions in the
following format: [{Name: suggestion1}, {Name: suggestion:2}, etc.].Usage
---------------------Include smarty-config.js and smarty.js in that order in your html. In your main Angular module,
inject angular-smarty, or if you're not using Angular elsewhere on your page, include
`angular.bootstrap(angular.element("body"), ["angular-smarty"]);` in a script tag in your html and
don't forget that Angular is a dependency.```js
$(function() {
angular.bootstrap(angular.element("body"), ["angular-smarty"]);
});
```Model your html after the following:
```html
angular-smarty demo
```