SlideShare a Scribd company logo
1 of 27
How to Create an Angular 2.0 Application in Liferay DXP to Fetch the
OOTB Advantages?
Intro
There have been years since technology has been instigating innovations for
the civilizations. That’s what we have been relating to something called
development. And we are now in a century where technology has reached to
an extent with such inventions that were unthinkable before. Virtual Reality
for instance is one of the aspects in this case. This is the science which deals
with the facets that actually do not exist!
AngularJS had already been much popular among developers and
enhancements of Angular 2.0 have made it even more preferred to create
speedy, rich and effective applications. As we know, Angular 2.0 also requires
third party tools to leverage security features, Authorization/Authentication
etc. With its OOTB functionalities, Liferay DXP can be proved an ideal solution
to be used with Angular 2.0 because of many reasons. Few are listed below:
• Liferay comes with more powerful security features as portal setup in
terms of creating SPA website using Angular
• Authorization/Authentication will be managed by Liferay, no need to
consider that part in Angular
• You can use any RESTful API to load data
• Write RESTful API in portlet and utilize it in angular services to serve CRUD
data operations
In this blog, step by step we will create a simple “Hello World” Angular 2.0 App
in Liferay DXP Theme. We have classified the blog in three easy steps for
simplified understanding.
Prerequisite
• Creation of Liferay theme
• Adding Angular files to Liferay theme
Prerequisite:
• You need to have the basic idea about creating a simple Angular application
• If you are too new to Angular, please find the basic
understanding https://angular.io/docs/js/latest/quickstart.html
• You need to have primary knowledge about creating a theme for Liferay
DXP
If you are not familiar with Liferay theme creation, please
find the primary knowledge at Step by Step Guide to Create Theme for
Liferay DXP.
Once you are ready with essential information, we are ready to start our
actual work.
Creation of Liferay theme
Create new Liferay Theme “hello-world-theme” and deploy it
• Create blank website “my-website” and create a public page “home”.
• Apply newly created “hello-world-theme” to “home” page.
• If you observe your code, you will have following structure for your newly
created “hello-world-theme”:
Adding Angular to Liferay theme
1. Now, let’s add Angular files to Liferay theme
• Create new folder “templates” in “src” folder.
• Go to “build” folder and copy “portal_normal.ftl” file and place it in src >
templates folder.
Your “src” folder will look like image shown below.
2. Load Node Modules for Angular dependencies
• Go to your “src” folder and create “package.json” file. Paste following code:
• If you want to use latest packages, go to Angular.io, and grab latest
package.json file. Go to directory D:wsthemeshello-world-themesrc in
CMD and run command “npm install”
Now you able to see “node_modules” folder created inside “src” folder.
You have all dependent modules installed in your theme > src > node_modules
folder.
• 3. Create “App” folder inside “src” folder and create two
files app.component.js and app.module.js.
And put below code in app.module.js file:
4. Now we have some files in “App” and “node_modules” folder and the
complexity is how to call files from the folders because by default Liferay
provides access only to CSS, JS and Images folder.
• As a solution, we have to create freemarker variables to load files
from “App” and “node_modules” folder.
• Open “portal_normal.ftl” from “templates” folder and put below code
inside <head> section.
Now we have ${appPath} and ${nodeModules} path available to access files
inside these folders.
5. Load libraries and app files into theme. Search for <!– inject:js–><!–
endinject –>text in portal_normal.ftl.
• Put the below given code between <!– inject:js–><!– endinject –
> comments.
• You will be able to see the files being loaded
from ${nodeModules} and ${appPath}folder.
6. It is time to load your angular app now
• Go to <section id=”content”> in portal_normal.ftl and then insert <my-
app>Loading…</my-app>
If you observe, your complete portal_normal.ftl code will look as shown
below.
Once all above actions are completed, it’s time to build theme and run your
App.
• “build” your theme
• “deploy” your theme
• Refresh your browser
And that’s done. Your first Angular 2.0 App in Liferay DXP is ready now.
Liferay DXP can make your Angular 2.0 application much secured. Its OOTB
features and functionalities save you from lot of code work and they easily
can be integrated with Angular 2.0 app. It will offer quick and rich user
experience to the user. As a matter of fact, Liferay DXP has got potential to
offer robust and highly scalable technology solutions. If researched and
executed well, it can empower other technologies as well.
If you longing to learn more, please mail us your query.
Original Source :
http://www.azilen.com/blog/create-an-angular-2-application-in-liferay-dxp/
Thanks You
www.azilen.com
Let us know if you have any Question!
info@azilen.com | +1-972-325-2243

More Related Content

What's hot

Titanium Alloy Framework
Titanium Alloy FrameworkTitanium Alloy Framework
Titanium Alloy FrameworkTechday7
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps QuicklyGil Irizarry
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015Mike McNeil
 
Word press 4.4 what’s new?
Word press 4.4   what’s new?Word press 4.4   what’s new?
Word press 4.4 what’s new?Frank Jones
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day trainingTroy Miles
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Edureka!
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScriptLearnNowOnline
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLo Ki
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting StartedTracy Lee
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninEzéchiel Amen AGBLA
 
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017Matt Raible
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+uploadTianwei_liu
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERENadav Mary
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)christopherfross
 
Experience Session - Hari
Experience Session - HariExperience Session - Hari
Experience Session - HariSV.CO
 
SV.CO’s iterative product development
SV.CO’s iterative product developmentSV.CO’s iterative product development
SV.CO’s iterative product developmenthari
 

What's hot (20)

Alloy backbone
Alloy backboneAlloy backbone
Alloy backbone
 
Titanium Alloy Framework
Titanium Alloy FrameworkTitanium Alloy Framework
Titanium Alloy Framework
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015
 
Word press 4.4 what’s new?
Word press 4.4   what’s new?Word press 4.4   what’s new?
Word press 4.4 what’s new?
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
 
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+upload
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Experience Session - Hari
Experience Session - HariExperience Session - Hari
Experience Session - Hari
 
SV.CO’s iterative product development
SV.CO’s iterative product developmentSV.CO’s iterative product development
SV.CO’s iterative product development
 
Dallas meetup
Dallas meetupDallas meetup
Dallas meetup
 

Similar to How to create an angular 2.0 application in liferay dxp to fetch the ootb advantages

Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
Learn reactjs, how to code with example and general understanding thinkwik
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwikHetaxi patel
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGGDBologna
 
White Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeWhite Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeHamida Rebai Trabelsi
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshareSaleemMalik52
 
Html5 today
Html5 todayHtml5 today
Html5 todayRoy Yu
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013ralcocer
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Ricardo Alcocer
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfiFour Technolab Pvt. Ltd.
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1Rich Helton
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsSasha dos Santos
 

Similar to How to create an angular 2.0 application in liferay dxp to fetch the ootb advantages (20)

Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Learn reactjs, how to code with example and general understanding thinkwik
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwik
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
 
Oracle jet
Oracle jetOracle jet
Oracle jet
 
White Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeWhite Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and Prime
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
BackboneJS
BackboneJSBackboneJS
BackboneJS
 
Html5 today
Html5 todayHtml5 today
Html5 today
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
django
djangodjango
django
 
Angular
AngularAngular
Angular
 
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
 
Angular IO
Angular IOAngular IO
Angular IO
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 

More from Azilen Technologies Pvt. Ltd.

[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...Azilen Technologies Pvt. Ltd.
 
How to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behaviorHow to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behaviorAzilen Technologies Pvt. Ltd.
 
Realm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilitiesRealm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilitiesAzilen Technologies Pvt. Ltd.
 
A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...Azilen Technologies Pvt. Ltd.
 
Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!Azilen Technologies Pvt. Ltd.
 
How to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website applicationHow to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website applicationAzilen Technologies Pvt. Ltd.
 
iPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce StoreiPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce StoreAzilen Technologies Pvt. Ltd.
 
[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...Azilen Technologies Pvt. Ltd.
 
Rfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning pathRfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning pathAzilen Technologies Pvt. Ltd.
 
[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...Azilen Technologies Pvt. Ltd.
 
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...Azilen Technologies Pvt. Ltd.
 
Google cardboard the most cost effective virtual reality technology by google
Google cardboard the most cost effective virtual reality technology by googleGoogle cardboard the most cost effective virtual reality technology by google
Google cardboard the most cost effective virtual reality technology by googleAzilen Technologies Pvt. Ltd.
 

More from Azilen Technologies Pvt. Ltd. (20)

Software Product Development for Startups.pdf
Software Product Development for Startups.pdfSoftware Product Development for Startups.pdf
Software Product Development for Startups.pdf
 
How Chatbots Empower Healthcare Ecosystem?
How Chatbots Empower Healthcare Ecosystem?How Chatbots Empower Healthcare Ecosystem?
How Chatbots Empower Healthcare Ecosystem?
 
[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...
 
How to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behaviorHow to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behavior
 
Liferay dxp – the good, the bad and the ugly
Liferay dxp – the good, the bad and the uglyLiferay dxp – the good, the bad and the ugly
Liferay dxp – the good, the bad and the ugly
 
Realm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilitiesRealm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilities
 
A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...
 
Register Virtual Device and analyze the device data
Register Virtual Device and analyze the device dataRegister Virtual Device and analyze the device data
Register Virtual Device and analyze the device data
 
Analytics and etl based bi solutions
Analytics and etl based bi solutionsAnalytics and etl based bi solutions
Analytics and etl based bi solutions
 
Advanced risk management &amp; mitigation system
Advanced risk management &amp; mitigation systemAdvanced risk management &amp; mitigation system
Advanced risk management &amp; mitigation system
 
Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!
 
How to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website applicationHow to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website application
 
A walkthrough of recently held wwdc17
A walkthrough of recently held wwdc17A walkthrough of recently held wwdc17
A walkthrough of recently held wwdc17
 
How wearable devices are changing our lives
How wearable devices are changing our livesHow wearable devices are changing our lives
How wearable devices are changing our lives
 
iPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce StoreiPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce Store
 
[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...
 
Rfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning pathRfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning path
 
[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...
 
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...
 
Google cardboard the most cost effective virtual reality technology by google
Google cardboard the most cost effective virtual reality technology by googleGoogle cardboard the most cost effective virtual reality technology by google
Google cardboard the most cost effective virtual reality technology by google
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

How to create an angular 2.0 application in liferay dxp to fetch the ootb advantages

  • 1. How to Create an Angular 2.0 Application in Liferay DXP to Fetch the OOTB Advantages?
  • 2. Intro There have been years since technology has been instigating innovations for the civilizations. That’s what we have been relating to something called development. And we are now in a century where technology has reached to an extent with such inventions that were unthinkable before. Virtual Reality for instance is one of the aspects in this case. This is the science which deals with the facets that actually do not exist!
  • 3. AngularJS had already been much popular among developers and enhancements of Angular 2.0 have made it even more preferred to create speedy, rich and effective applications. As we know, Angular 2.0 also requires third party tools to leverage security features, Authorization/Authentication etc. With its OOTB functionalities, Liferay DXP can be proved an ideal solution to be used with Angular 2.0 because of many reasons. Few are listed below: • Liferay comes with more powerful security features as portal setup in terms of creating SPA website using Angular • Authorization/Authentication will be managed by Liferay, no need to consider that part in Angular • You can use any RESTful API to load data • Write RESTful API in portlet and utilize it in angular services to serve CRUD data operations
  • 4. In this blog, step by step we will create a simple “Hello World” Angular 2.0 App in Liferay DXP Theme. We have classified the blog in three easy steps for simplified understanding. Prerequisite • Creation of Liferay theme • Adding Angular files to Liferay theme Prerequisite: • You need to have the basic idea about creating a simple Angular application • If you are too new to Angular, please find the basic understanding https://angular.io/docs/js/latest/quickstart.html • You need to have primary knowledge about creating a theme for Liferay DXP
  • 5. If you are not familiar with Liferay theme creation, please find the primary knowledge at Step by Step Guide to Create Theme for Liferay DXP. Once you are ready with essential information, we are ready to start our actual work.
  • 6. Creation of Liferay theme Create new Liferay Theme “hello-world-theme” and deploy it • Create blank website “my-website” and create a public page “home”. • Apply newly created “hello-world-theme” to “home” page. • If you observe your code, you will have following structure for your newly created “hello-world-theme”:
  • 7.
  • 8. Adding Angular to Liferay theme 1. Now, let’s add Angular files to Liferay theme • Create new folder “templates” in “src” folder. • Go to “build” folder and copy “portal_normal.ftl” file and place it in src > templates folder. Your “src” folder will look like image shown below.
  • 9.
  • 10. 2. Load Node Modules for Angular dependencies • Go to your “src” folder and create “package.json” file. Paste following code:
  • 11. • If you want to use latest packages, go to Angular.io, and grab latest package.json file. Go to directory D:wsthemeshello-world-themesrc in CMD and run command “npm install”
  • 12. Now you able to see “node_modules” folder created inside “src” folder. You have all dependent modules installed in your theme > src > node_modules folder.
  • 13. • 3. Create “App” folder inside “src” folder and create two files app.component.js and app.module.js.
  • 14.
  • 15. And put below code in app.module.js file:
  • 16. 4. Now we have some files in “App” and “node_modules” folder and the complexity is how to call files from the folders because by default Liferay provides access only to CSS, JS and Images folder. • As a solution, we have to create freemarker variables to load files from “App” and “node_modules” folder. • Open “portal_normal.ftl” from “templates” folder and put below code inside <head> section.
  • 17. Now we have ${appPath} and ${nodeModules} path available to access files inside these folders. 5. Load libraries and app files into theme. Search for <!– inject:js–><!– endinject –>text in portal_normal.ftl. • Put the below given code between <!– inject:js–><!– endinject – > comments.
  • 18.
  • 19. • You will be able to see the files being loaded from ${nodeModules} and ${appPath}folder. 6. It is time to load your angular app now • Go to <section id=”content”> in portal_normal.ftl and then insert <my- app>Loading…</my-app> If you observe, your complete portal_normal.ftl code will look as shown below.
  • 20.
  • 21.
  • 22.
  • 23. Once all above actions are completed, it’s time to build theme and run your App. • “build” your theme • “deploy” your theme • Refresh your browser And that’s done. Your first Angular 2.0 App in Liferay DXP is ready now.
  • 24.
  • 25. Liferay DXP can make your Angular 2.0 application much secured. Its OOTB features and functionalities save you from lot of code work and they easily can be integrated with Angular 2.0 app. It will offer quick and rich user experience to the user. As a matter of fact, Liferay DXP has got potential to offer robust and highly scalable technology solutions. If researched and executed well, it can empower other technologies as well. If you longing to learn more, please mail us your query.
  • 27. Thanks You www.azilen.com Let us know if you have any Question! info@azilen.com | +1-972-325-2243