Thursday, June 25, 2015

AngularJS and Twitter Bootstrap and search glyphicon


<!DOCTYPE html>
<html lang="en">


<head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
</head>
<script>
    angular.module("simpleapp", [])
        .controller("SimpleController", function ($scope) {
            $scope.entity = {};
            $scope.entity.title = "A simple AngularJS app";
        });
</script>
<body ng-app="simpleapp">


    <div ng-controller="SimpleController">

        <h2>Hello, {{entity.title}}</h2>

    </div>

    <div class="input-group">
        <span class="input-group-addon">
            <span class="glyphicon glyphicon-search"></span>
        </span>
        <input type="text" class="form-control" ng-model="main.searchInput">
    </div>

</body>

</html>

No comments:

Post a Comment