• Stars
    star
    227
  • Rank 175,900 (Top 4 %)
  • Language
    JavaScript
  • License
    BSD 3-Clause "New...
  • Created over 10 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Autocomplete UI written with Angular JS.

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.

$(function() {
    angular.bootstrap(angular.element("body"), ["angular-smarty"]);
});

Model your html after the following:

<body ng-controller="SmartyController">
    <div class="container-main">
        <h1>angular-smarty demo</h1>
        <div class="container-autocomplete">
            <input type="text" smarty-input select="setSelected(x)"
                index="selected" list-items="suggestions" close="suggestionPicked()"
                selection-made="selectionMade" ng-model="prefix"></input>
            <div smarty-suggestions-box></div>
            <input type="text" focus-me focus-when="{{selectionMade}}"></input>
        </div>
    </div>
</body>

More Repositories

1

abba

Javascript and Python libraries for A/B test analysis
JavaScript
246
star
2

thumbprint

Thumbprint is the design system at Thumbtack.
TypeScript
199
star
3

pgdoctor

Simple, lightweight web service to perform health checks on PostgreSQL instances
C
69
star
4

thumbprint-ios

Thumbprint is the design system at Thumbtack.
Swift
32
star
5

rotarymaps

Rotary Maps
JavaScript
32
star
6

star

Generate reports on how frequently specified Swift types are being used in your iOS codebase
Swift
27
star
7

becquerel

Gateway server that provides an OData interface to BigQuery and Elasticsearch
Scala
18
star
8

dynamodb-rename

Rename a DynamoDB table by copying the content (in real time)
Go
15
star
9

SwiftRunOnce

A declarative, thread safe, and reentrant way to define code that should only execute at most once over the lifetime of an object.
Swift
14
star
10

thumbprint-android

Thumbprint is the design system at Thumbtack
Kotlin
10
star
11

thumbprint-tokens

Design variables that power Thumbtack’s UI.
TypeScript
9
star
12

crankshaft

PHP version of Python's itertools
PHP
7
star
13

angular-scrollery

Scroll-based animation framework for AngularJS.
CSS
7
star
14

querycache

A simple query caching layer built around PDO
PHP
6
star
15

TTCalendarPicker

A lightweight, highly customizable, infinite scrolling calendar picker developed by the iOS teams at Thumbtack
Swift
6
star
16

ESS-data

Use of this data requires citing Thumbtack and linking to Thumbtack.com. For more, see the data license.
5
star
17

maxwells-daemon

Daemon for arbitrating traffic to different versions of an application
Go
3
star
18

ttinjector

PHP
3
star
19

pgCarpenter

PostgreSQL Continuous Archiving and Point-in-Time Recovery
Go
1
star
20

aws-session-credentials

A method for mfa-authenticated API access to AWS resources
Python
1
star
21

jafar

Behavior-driven testing for PHP (like Jasmine)
PHP
1
star
22

docker-registry

A docker registry image that will use local storage
Shell
1
star
23

datadog-petshop

Synchronize data between Datadog and the local system
Haskell
1
star
24

SBFS-data

Use of this data requires citing Thumbtack and linking to Thumbtack.com. For more, see the data license.
HTML
1
star