<!doctype html> <html> <head> <script src="libs/angular.min.js"></script> </head> <body> <div ng-app="myApp" ng-controller="myController"> Enter subject<br /> <input type="text" ng-model="subjectName" /><br /> <p>Selected subject name is <span ng-bind="subjectName"></span></p> <ul> <li ng-repeat="subject in student.subjects | filter : subjectName">{{subject.name}}</li> </ul> </div> <script> var app = angular.module("myApp", []); app.controller("myController", function($scope) { $scope.student = { subjects : [{"name" : "English"}, {"name" : "Mathematics"}] }; }); </script> </body> </html>
Friday, June 30, 2017
Using filter filter example in Angular
Subscribe to:
Post Comments (Atom)
Get Indian financial year based on date
This function lets you get the start and end date of Indian financial year based on given date. This can also be modified for US financia...
-
Go to your project folder and execute the below command npm install bootstrap@3.3.5 --save This will install the bootstrap version 3.3...
-
Add a key "homepage": "your-subfolder/" in your package.json All static files will be loaded from "your-subfold...
-
This function lets you get the start and end date of Indian financial year based on given date. This can also be modified for US financia...
No comments:
Post a Comment