paulwong

angular-smarty

angular-smarty 是一个基于 AngularJS 实现的自动完成的 UI 实现。

使用方法:
<html>
<head>
    <title>angular-smarty demo</title>
    <link rel="stylesheet" type="text/css" href="smarty.css"></link>
</head>
<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>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.js"></script>
<script type="text/javascript" src="smarty-config.js"></script>
<script type="text/javascript" src="smarty.js"></script>
<script type="text/javascript">
    $(
function() {
        angular.bootstrap(angular.element(
"body"), ["angular-smarty"]);
    });
</script>
</html>

https://github.com/thumbtack/angular-smarty

posted on 2014-06-19 09:01 paulwong 阅读(568) 评论(0)  编辑  收藏 所属分类: ANGULARJS


只有注册用户登录后才能发表评论。


网站导航: