<!DOCTYPE hmtl> <html lang = "en"> <head> <meta charset = "UTF-8" name = "viewport" content = "width-device=width, initial-scale=1" /> <link rel = "stylesheet" type = "text/css" href = "css/bootstrap.css" /> </head> <body ng-app = "myModule"> <nav class = "navbar navbar-default"> <div class = "container-fluid"> </div> </nav> <div class = "row" ng-controller = "myController"> <div class = "col-md-6 well"> <hr style = "border-top:1px solid #000;"/> <form class="form-inline"> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" id="exampleInputAmount" placeholder="Enter Here" ng-model = "search"> </div> </div> </form> <table class = "table table-bordered alert-warning"> <thead> <tr> </tr> </thead> <tbody> <tr ng-repeat = "PLang in PLangs | filter: search"> </tr> </tbody> </table> </div> </div> </body> </html>
var myApp = angular.module("myModule", []) .controller("myController", function($scope){ var PLangs = [ {name: "C", creator: "Dennis Ritchie"}, {name: "C++", creator: "Bjarne Stroustrup"}, {name: "C#", creator: "Anders Hejlsberg"}, {name: "Java", creator: "James Gosling"}, {name: "HTML", creator: "Tim Berners-Lee"}, {name: "Javascript", creator: "Brendan Eich"}, {name: "PHP", creator: "Rasmus Lerdorf"}, {name: "Python", creator: "Guido van Rossum"}, {name: "Ruby", creator: "Yukihiro Matsumoto"}, {name: "Perl", creator: "Larry Wall"}, {name: "Scala", creator: "Martin Odersky"}, {name: "Bash", creator: "Brian Fox"}, {name: "Clojure", creator: "Rich Hickey"} ]; $scope.PLangs = PLangs; });