SlideShare a Scribd company logo
SINGLE PAGE APPLICATION 5
ENG. ISMAIL ENJRENY
Filters
• Filters allow you to declare how to transform data for display to the user within
an interpolation in your template.
{{ expression | filtername : parameter1 : ...parametern }}
• You’re not limited to the bundled filters, and it is simple to write your own
{{12.9 | currency}}  $12.90
Filters (cont.)
• Formatting Filters: AngularJS comes with a set of built-in formatting filters which can be used in conjunction with
the interpolation directive, and with ng-bind
• date
• currency
• number
• lowercase
• uppercase
• json
• Array Filters
• limitTo
• filter
• orderBy
Filters - date (cont.)
• Formats date to a string based on the requested format
{{ date_expression | date : format : timezone}}
• Examples:
• <span>{{1288323623006 | date:'medium'}}</span> -> Oct 29, 2010 6:40:23 AM
• <span>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>
• 10/29/2010 @ 6:40AM
Filters - currency (cont.)
• Formats a number as a currency (ie $1,234.56). When no currency symbol is
provided, default symbol for current locale is used.
• {{ currency_expression | currency : symbol : fractionsize}}
<pre ng-non-bindable>{{168 | currency : ‘SAR' : 0}}</pre> =
SAR168
Filters - number (cont.)
• Formats a number as text
• {{number_expression | number : fractionsize}}
{{2434.656 | number:2 }} = 2,434.66
Filters - lowercase (cont.)
• Converts string to lowercase.
• {{ lowercase_expression | lowercase}}
{{'HELLO ismaeel' | lowercase}} = hello ismaeel
Filters - uppercase (cont.)
• Converts string to uppercase.
• {{ uppercase_expression | uppercase}}
{{'HELLO ismaeel' | uppercase}} = HELLO ISMAEEL
Filters - json (cont.)
• Allows you to convert a JavaScript object into JSON string.
• {{ json_expression | json : spacing}}
Filters - limitTo (cont.)
• Creates a new array or string containing only a specified number of elements.
The elements are taken from either the beginning or the end of the source
array, string or number, as specified by the value and sign (positive or negative)
of limit. If a number is used as input, it is converted to a string.
• {{ limitto_expression | limitto : limit}}
{{'Hello Angular' | limitTo:5}} = Hello
Filters - orderBy (cont.)
• Orders a specified array by the expression predicate. It is ordered alphabetically
for strings and numerically for numbers.
• {{ array | orderBy : expression : reverse}}
Filters - filter (cont.)
• Selects a subset of items from array and returns it as a new array.
• {{ filter_expression | filter : comparator}}
Filters (cont.)
• $filter('currency')(amount, symbol, fractionsize)
• $filter('date')(date, format, timezone)
• $filter('filter')(array, expression, comparator)
• $filter('json')(object, spacing)
• $filter('limitTo')(input, limit)
• $filter('lowercase')(input)
• $filter('number')(number, fractionsize)
• $filter('orderby')(array, expression, reverse)
• $filter('uppercase')(input)
$http
• The $http service is a core Angular service that facilitates communication with the
remote HTTP servers via the browser's XMLHttpRequest object or via JSONP.
• Methods
• get
• head
• post
• put
• delete
• jsonp
• patch
$http – Caching (cont.)
• To enable caching, set the request configuration cache property to true (to use
default cache) or to a custom cache object (built with $cacheFactory).
• When the cache is enabled, $http stores the response from the server in the
specified cache. The next time the same request is made, the response is served
from the cache without sending a request to the server.
$http – config (cont.)
• method: GET, POST, …
• url: Absolute or relative URL of the resource that is being requested.
• params: Map of strings or objects which will be turned to
?key1=value1&key2=value2 after the url. If the value is not a string, it will be
JSONified.
• data: {string|Object} – Data to be sent as the request message data.
• headers: {Object} – Map of strings or functions which return strings representing
HTTP headers to send to the server. If the return value of a function is null, the
header will not be sent. Functions accept a config object as an argument.
$http – config (cont.)
• xsrfHeaderName: {string} – Name of HTTP header to populate with the XSRF token.
• xsrfCookieName: {string} – Name of cookie containing the XSRF token.
• cache: {boolean|Cache} – If true, a default $http cache will be used to cache the GET
request, otherwise if a cache instance built with $cacheFactory, this cache will be
used for caching.
• timeout: {number} – timeout in milliseconds.
• withCredentials: {boolean} - whether to set the withCredentials flag on the XHR
object.
• responseType: either use emoty string (default value) or use json as value.
$http – config (cont.)
• success(function (data, status, headers, config) {}
• error(function (data, status, headers, config) {}
NEXT?

More Related Content

What's hot (20)

Refinement Types for Haskell
Refinement Types for HaskellRefinement Types for Haskell
Refinement Types for Haskell
Martin Ockajak
 
Comparing Haskell & Scala
Comparing Haskell & ScalaComparing Haskell & Scala
Comparing Haskell & Scala
Martin Ockajak
 
Scala for Java Developers
Scala for Java DevelopersScala for Java Developers
Scala for Java Developers
Martin Ockajak
 
Using xml in a data set (ado.net)
Using xml in a data set (ado.net)Using xml in a data set (ado.net)
Using xml in a data set (ado.net)
Alfred Jett Grandeza
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closures
Knoldus Inc.
 
Templates in c++
Templates in c++Templates in c++
Templates in c++
Mayank Bhatt
 
C# 4.0 dynamic
C# 4.0 dynamicC# 4.0 dynamic
C# 4.0 dynamic
Wiryadi Adidharma
 
Exp 6.1 d-422-1
Exp 6.1  d-422-1Exp 6.1  d-422-1
Exp 6.1 d-422-1
Omkar Rane
 
Head first latex
Head first latexHead first latex
Head first latex
Chung-Hsiang Ofa Hsueh
 
QuickCheck - Software Testing
QuickCheck - Software TestingQuickCheck - Software Testing
QuickCheck - Software Testing
Javran
 
Algorithm and Programming (Array)
Algorithm and Programming (Array)Algorithm and Programming (Array)
Algorithm and Programming (Array)
Adam Mukharil Bachtiar
 
Linear data structure concepts
Linear data structure conceptsLinear data structure concepts
Linear data structure concepts
Akila Krishnamoorthy
 
Array within a class
Array within a classArray within a class
Array within a class
AAKASH KUMAR
 
AngularJS filters
AngularJS filtersAngularJS filters
AngularJS filters
Tricode (part of Dept)
 
Apache Spark - Aram Mkrtchyan
Apache Spark - Aram MkrtchyanApache Spark - Aram Mkrtchyan
Apache Spark - Aram Mkrtchyan
Hovhannes Kuloghlyan
 
Legacy lambda code
Legacy lambda codeLegacy lambda code
Legacy lambda code
Peter Lawrey
 
array of object pointer in c++
array of object pointer in c++array of object pointer in c++
array of object pointer in c++
Arpita Patel
 
Streams and lambdas the good, the bad and the ugly
Streams and lambdas the good, the bad and the uglyStreams and lambdas the good, the bad and the ugly
Streams and lambdas the good, the bad and the ugly
Peter Lawrey
 
SQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL FundamentalsSQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL Fundamentals
MuhammadWaheed44
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
WebStackAcademy
 
Refinement Types for Haskell
Refinement Types for HaskellRefinement Types for Haskell
Refinement Types for Haskell
Martin Ockajak
 
Comparing Haskell & Scala
Comparing Haskell & ScalaComparing Haskell & Scala
Comparing Haskell & Scala
Martin Ockajak
 
Scala for Java Developers
Scala for Java DevelopersScala for Java Developers
Scala for Java Developers
Martin Ockajak
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closures
Knoldus Inc.
 
Exp 6.1 d-422-1
Exp 6.1  d-422-1Exp 6.1  d-422-1
Exp 6.1 d-422-1
Omkar Rane
 
QuickCheck - Software Testing
QuickCheck - Software TestingQuickCheck - Software Testing
QuickCheck - Software Testing
Javran
 
Array within a class
Array within a classArray within a class
Array within a class
AAKASH KUMAR
 
Legacy lambda code
Legacy lambda codeLegacy lambda code
Legacy lambda code
Peter Lawrey
 
array of object pointer in c++
array of object pointer in c++array of object pointer in c++
array of object pointer in c++
Arpita Patel
 
Streams and lambdas the good, the bad and the ugly
Streams and lambdas the good, the bad and the uglyStreams and lambdas the good, the bad and the ugly
Streams and lambdas the good, the bad and the ugly
Peter Lawrey
 
SQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL FundamentalsSQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL Fundamentals
MuhammadWaheed44
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
WebStackAcademy
 

Viewers also liked (6)

Single page application 03
Single page application   03Single page application   03
Single page application 03
Ismaeel Enjreny
 
Solr Introduction
Solr IntroductionSolr Introduction
Solr Introduction
Ismaeel Enjreny
 
Redis - Partitioning
Redis - PartitioningRedis - Partitioning
Redis - Partitioning
Ismaeel Enjreny
 
Redis Clients Handling
Redis Clients HandlingRedis Clients Handling
Redis Clients Handling
Ismaeel Enjreny
 
Redis Security
Redis SecurityRedis Security
Redis Security
Ismaeel Enjreny
 
Single page application 04
Single page application   04Single page application   04
Single page application 04
Ismaeel Enjreny
 

Similar to Single page application 05 (20)

json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
AmitSharma397241
 
Query String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptxQuery String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptx
HemaSenthil5
 
Json the-x-in-ajax1588
Json the-x-in-ajax1588Json the-x-in-ajax1588
Json the-x-in-ajax1588
Ramamohan Chokkam
 
tutorial 10 Exploring Arrays, Loops, and conditional statements.ppt
tutorial 10 Exploring Arrays, Loops, and conditional statements.ppttutorial 10 Exploring Arrays, Loops, and conditional statements.ppt
tutorial 10 Exploring Arrays, Loops, and conditional statements.ppt
AbdisamedAdam
 
Web technologies-course 10.pptx
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptx
Stefan Oprea
 
Advance topics of C language
Advance  topics of C languageAdvance  topics of C language
Advance topics of C language
Mehwish Mehmood
 
Query String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptxQuery String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptx
HemaSenthil5
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchange
Christoph Santschi
 
Rest api development presentation file online
Rest api development presentation file onlineRest api development presentation file online
Rest api development presentation file online
ViruShah3
 
Pandas csv
Pandas csvPandas csv
Pandas csv
Devashish Kumar
 
JavaScript.pptx
JavaScript.pptxJavaScript.pptx
JavaScript.pptx
KennyPratheepKumar
 
Data weave (MuleSoft)
Data weave (MuleSoft)Data weave (MuleSoft)
Data weave (MuleSoft)
Nandu List5
 
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Ontico
 
Mongo db queries
Mongo db queriesMongo db queries
Mongo db queries
ssuser6d5faa
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
karthik kumar
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
karthik kumar
 
Sql server 2016: System Databases, data types, DML, json, and built-in functions
Sql server 2016: System Databases, data types, DML, json, and built-in functionsSql server 2016: System Databases, data types, DML, json, and built-in functions
Sql server 2016: System Databases, data types, DML, json, and built-in functions
Seyed Ibrahim
 
MongoDB's New Aggregation framework
MongoDB's New Aggregation frameworkMongoDB's New Aggregation framework
MongoDB's New Aggregation framework
Chris Westin
 
Algorithms devised for a google interview
Algorithms devised for a google interviewAlgorithms devised for a google interview
Algorithms devised for a google interview
Russell Childs
 
Exploiting the query structure for efficient join ordering in SPARQL queries
Exploiting the query structure for efficient join ordering in SPARQL queriesExploiting the query structure for efficient join ordering in SPARQL queries
Exploiting the query structure for efficient join ordering in SPARQL queries
Luiz Henrique Zambom Santana
 
json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
AmitSharma397241
 
Query String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptxQuery String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptx
HemaSenthil5
 
tutorial 10 Exploring Arrays, Loops, and conditional statements.ppt
tutorial 10 Exploring Arrays, Loops, and conditional statements.ppttutorial 10 Exploring Arrays, Loops, and conditional statements.ppt
tutorial 10 Exploring Arrays, Loops, and conditional statements.ppt
AbdisamedAdam
 
Web technologies-course 10.pptx
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptx
Stefan Oprea
 
Advance topics of C language
Advance  topics of C languageAdvance  topics of C language
Advance topics of C language
Mehwish Mehmood
 
Query String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptxQuery String Parameters & Methods in NodeJS.pptx
Query String Parameters & Methods in NodeJS.pptx
HemaSenthil5
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchange
Christoph Santschi
 
Rest api development presentation file online
Rest api development presentation file onlineRest api development presentation file online
Rest api development presentation file online
ViruShah3
 
Data weave (MuleSoft)
Data weave (MuleSoft)Data weave (MuleSoft)
Data weave (MuleSoft)
Nandu List5
 
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Ontico
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
karthik kumar
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
karthik kumar
 
Sql server 2016: System Databases, data types, DML, json, and built-in functions
Sql server 2016: System Databases, data types, DML, json, and built-in functionsSql server 2016: System Databases, data types, DML, json, and built-in functions
Sql server 2016: System Databases, data types, DML, json, and built-in functions
Seyed Ibrahim
 
MongoDB's New Aggregation framework
MongoDB's New Aggregation frameworkMongoDB's New Aggregation framework
MongoDB's New Aggregation framework
Chris Westin
 
Algorithms devised for a google interview
Algorithms devised for a google interviewAlgorithms devised for a google interview
Algorithms devised for a google interview
Russell Childs
 
Exploiting the query structure for efficient join ordering in SPARQL queries
Exploiting the query structure for efficient join ordering in SPARQL queriesExploiting the query structure for efficient join ordering in SPARQL queries
Exploiting the query structure for efficient join ordering in SPARQL queries
Luiz Henrique Zambom Santana
 

More from Ismaeel Enjreny (20)

Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
Ismaeel Enjreny
 
Fleet and elastic agent
Fleet and elastic agentFleet and elastic agent
Fleet and elastic agent
Ismaeel Enjreny
 
Elastic 101 ingest manager
Elastic 101   ingest managerElastic 101   ingest manager
Elastic 101 ingest manager
Ismaeel Enjreny
 
Elastic 101 - API Logs
Elastic 101 - API Logs Elastic 101 - API Logs
Elastic 101 - API Logs
Ismaeel Enjreny
 
WSO2 Identity Server - Getting Started
WSO2 Identity Server - Getting StartedWSO2 Identity Server - Getting Started
WSO2 Identity Server - Getting Started
Ismaeel Enjreny
 
Elasticsearch k8s
Elasticsearch k8sElasticsearch k8s
Elasticsearch k8s
Ismaeel Enjreny
 
ELK Observability 1
ELK Observability 1ELK Observability 1
ELK Observability 1
Ismaeel Enjreny
 
ELK observability 2
ELK observability 2ELK observability 2
ELK observability 2
Ismaeel Enjreny
 
Wso2 is integration with .net core
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net core
Ismaeel Enjreny
 
Deploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on KubernetesDeploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on Kubernetes
Ismaeel Enjreny
 
Redis 101 Data Structure
Redis 101 Data StructureRedis 101 Data Structure
Redis 101 Data Structure
Ismaeel Enjreny
 
Redis 101 - INTRO
Redis 101 - INTRORedis 101 - INTRO
Redis 101 - INTRO
Ismaeel Enjreny
 
Elastic 101 ingest manager
Elastic 101   ingest managerElastic 101   ingest manager
Elastic 101 ingest manager
Ismaeel Enjreny
 
Getting started with Elasticsearch in .net
Getting started with Elasticsearch in .netGetting started with Elasticsearch in .net
Getting started with Elasticsearch in .net
Ismaeel Enjreny
 
Elastic 101 log enrichment
Elastic 101   log enrichmentElastic 101   log enrichment
Elastic 101 log enrichment
Ismaeel Enjreny
 
Elastic 101 index operations
Elastic 101   index operationsElastic 101   index operations
Elastic 101 index operations
Ismaeel Enjreny
 
Elastic 101 - Get started
Elastic 101 - Get startedElastic 101 - Get started
Elastic 101 - Get started
Ismaeel Enjreny
 
دليل البرمجة باستخدام Dynamo DB للمبتدئين
دليل البرمجة باستخدام Dynamo DB للمبتدئيندليل البرمجة باستخدام Dynamo DB للمبتدئين
دليل البرمجة باستخدام Dynamo DB للمبتدئين
Ismaeel Enjreny
 
Amazon services iam
Amazon services   iamAmazon services   iam
Amazon services iam
Ismaeel Enjreny
 
Amazon services ec2
Amazon services ec2Amazon services ec2
Amazon services ec2
Ismaeel Enjreny
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
Ismaeel Enjreny
 
Elastic 101 ingest manager
Elastic 101   ingest managerElastic 101   ingest manager
Elastic 101 ingest manager
Ismaeel Enjreny
 
WSO2 Identity Server - Getting Started
WSO2 Identity Server - Getting StartedWSO2 Identity Server - Getting Started
WSO2 Identity Server - Getting Started
Ismaeel Enjreny
 
Wso2 is integration with .net core
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net core
Ismaeel Enjreny
 
Deploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on KubernetesDeploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on Kubernetes
Ismaeel Enjreny
 
Redis 101 Data Structure
Redis 101 Data StructureRedis 101 Data Structure
Redis 101 Data Structure
Ismaeel Enjreny
 
Elastic 101 ingest manager
Elastic 101   ingest managerElastic 101   ingest manager
Elastic 101 ingest manager
Ismaeel Enjreny
 
Getting started with Elasticsearch in .net
Getting started with Elasticsearch in .netGetting started with Elasticsearch in .net
Getting started with Elasticsearch in .net
Ismaeel Enjreny
 
Elastic 101 log enrichment
Elastic 101   log enrichmentElastic 101   log enrichment
Elastic 101 log enrichment
Ismaeel Enjreny
 
Elastic 101 index operations
Elastic 101   index operationsElastic 101   index operations
Elastic 101 index operations
Ismaeel Enjreny
 
Elastic 101 - Get started
Elastic 101 - Get startedElastic 101 - Get started
Elastic 101 - Get started
Ismaeel Enjreny
 
دليل البرمجة باستخدام Dynamo DB للمبتدئين
دليل البرمجة باستخدام Dynamo DB للمبتدئيندليل البرمجة باستخدام Dynamo DB للمبتدئين
دليل البرمجة باستخدام Dynamo DB للمبتدئين
Ismaeel Enjreny
 

Recently uploaded (20)

Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 

Single page application 05

  • 1. SINGLE PAGE APPLICATION 5 ENG. ISMAIL ENJRENY
  • 2. Filters • Filters allow you to declare how to transform data for display to the user within an interpolation in your template. {{ expression | filtername : parameter1 : ...parametern }} • You’re not limited to the bundled filters, and it is simple to write your own {{12.9 | currency}}  $12.90
  • 3. Filters (cont.) • Formatting Filters: AngularJS comes with a set of built-in formatting filters which can be used in conjunction with the interpolation directive, and with ng-bind • date • currency • number • lowercase • uppercase • json • Array Filters • limitTo • filter • orderBy
  • 4. Filters - date (cont.) • Formats date to a string based on the requested format {{ date_expression | date : format : timezone}} • Examples: • <span>{{1288323623006 | date:'medium'}}</span> -> Oct 29, 2010 6:40:23 AM • <span>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span> • 10/29/2010 @ 6:40AM
  • 5. Filters - currency (cont.) • Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used. • {{ currency_expression | currency : symbol : fractionsize}} <pre ng-non-bindable>{{168 | currency : ‘SAR' : 0}}</pre> = SAR168
  • 6. Filters - number (cont.) • Formats a number as text • {{number_expression | number : fractionsize}} {{2434.656 | number:2 }} = 2,434.66
  • 7. Filters - lowercase (cont.) • Converts string to lowercase. • {{ lowercase_expression | lowercase}} {{'HELLO ismaeel' | lowercase}} = hello ismaeel
  • 8. Filters - uppercase (cont.) • Converts string to uppercase. • {{ uppercase_expression | uppercase}} {{'HELLO ismaeel' | uppercase}} = HELLO ISMAEEL
  • 9. Filters - json (cont.) • Allows you to convert a JavaScript object into JSON string. • {{ json_expression | json : spacing}}
  • 10. Filters - limitTo (cont.) • Creates a new array or string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string. • {{ limitto_expression | limitto : limit}} {{'Hello Angular' | limitTo:5}} = Hello
  • 11. Filters - orderBy (cont.) • Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. • {{ array | orderBy : expression : reverse}}
  • 12. Filters - filter (cont.) • Selects a subset of items from array and returns it as a new array. • {{ filter_expression | filter : comparator}}
  • 13. Filters (cont.) • $filter('currency')(amount, symbol, fractionsize) • $filter('date')(date, format, timezone) • $filter('filter')(array, expression, comparator) • $filter('json')(object, spacing) • $filter('limitTo')(input, limit) • $filter('lowercase')(input) • $filter('number')(number, fractionsize) • $filter('orderby')(array, expression, reverse) • $filter('uppercase')(input)
  • 14. $http • The $http service is a core Angular service that facilitates communication with the remote HTTP servers via the browser's XMLHttpRequest object or via JSONP. • Methods • get • head • post • put • delete • jsonp • patch
  • 15. $http – Caching (cont.) • To enable caching, set the request configuration cache property to true (to use default cache) or to a custom cache object (built with $cacheFactory). • When the cache is enabled, $http stores the response from the server in the specified cache. The next time the same request is made, the response is served from the cache without sending a request to the server.
  • 16. $http – config (cont.) • method: GET, POST, … • url: Absolute or relative URL of the resource that is being requested. • params: Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified. • data: {string|Object} – Data to be sent as the request message data. • headers: {Object} – Map of strings or functions which return strings representing HTTP headers to send to the server. If the return value of a function is null, the header will not be sent. Functions accept a config object as an argument.
  • 17. $http – config (cont.) • xsrfHeaderName: {string} – Name of HTTP header to populate with the XSRF token. • xsrfCookieName: {string} – Name of cookie containing the XSRF token. • cache: {boolean|Cache} – If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching. • timeout: {number} – timeout in milliseconds. • withCredentials: {boolean} - whether to set the withCredentials flag on the XHR object. • responseType: either use emoty string (default value) or use json as value.
  • 18. $http – config (cont.) • success(function (data, status, headers, config) {} • error(function (data, status, headers, config) {}
  • 19. NEXT?