ALL >> Education >> View Article
Getting Started With Angular 2 Step By Step : Your First Component
Getting Started with Angular 2 step by step : Your First Component
Why Should You Care?
And not only that,it draws on all the teachings of tons of projects carried out by thousands of developers in AngularJS to provide a more consistent and compact developer experience.One with a reduced number of concepts to grasp and an easy-to-learn development model and syntax.
It is also faster,provides server-side rendering out of the box,is cross-platform,supports legacy browsers. etc
Angular 2 is the regular way ahead for all the AngularJS engineers out there and an incredible decision for those that welcome a stubborn system with a reasonable arrangement of defaults,focus on measured quality and testability.
Is Angular 2 Ready?
Angular 2 is ready indeed! since the initial publishing of this article Angular 2 has gone from beta, to RC, to final and now it is in its version 4.It is used not only by numerous companies but even extensive lt at Google in more than 200 projects including AdWords,GreenTea (Google's internal CRM system), Google Fiber and Google Cloud Platform.
The Code Samples
You can download the complete code samples for this blog post from this GitHub repo. You can likewise check the incredibly cool online supervisor Stackblitz which has wonderful suppoprt for composing Angular models on the web.My recommendation is that you follow the tutorial along using your own development environment,that way you get to enjoy the full Angular developer experience.But if you do not have time or energy to set it up right now, then try Stackblitz.
Getting Started with Angular 2 and Typescipt
The most ideal approach to begin learning Angular 2 and Typescript is to utilize the Angular CLI to bootstrap another task.
So start by installing the Angular CLI using npm ( you will need to install node.js and npm in your development machine before you can continue).In your terminal of chioce type :
PS> npm install -g @angular/cli
Presently you are prepared to utilize the Angular CLI to make another project.The direction that you use to get to the Angular CLI is ng.To make another application type the accompanying.
PS> ng new angular-get-started --style scss
This will make another Angular 2 venture sans preparation and set it up with the goal that you can utilize SASS as CSS preprocessor.If you go inside the angular-get-started folder that should have just been created you will find a folder structure that will look more or less like this :
// app source code (and specs)
-app # your app source code (and specs)
-assets # static assets like images, etc.
-index.html # the entry point to your app
-styles,scss # the global styles for your app
-environments #here you can define different environment configuration (prod,dev, etc).
- node_modules# the source code of your app's dependencies
- package.json# the manifest of your app that states all dependencies
-tsconfig,json # TypeScript compiler configuration
-tslint.json # TypeScript linting configuration
-e2e #a folder with end to end tests
-karma.conf.js #karma test runner configuration
-protractor.conf.js # protractor e2e tests configuration
You can test everything works as it should by running the development server.Type the following command.
PS> ng serve --open
# the short-hand syntax is : ng s -o
This should start the development server,open a browser and load your app.You can stop the server any time by typing CTRL-C a couple of times in the terminal.But for the time being just rejoice!You have created your first Angular 2 application!
#INDEX.HTML THE ENTRY POINT FOR YOUR APP
The index.html is the entry point to your application.
*It provides the HTML markup for your application with the custom element.
Select for INFO CAMPUS SOFTWARE TRAINING CENTER and get trained with specialists.Find Angular 2 courses, classes in Marathahalli Bangalore at Infocampus with Real-Time Project Training, Hands-on Experience Mentors. 100% Placement Assistance after Immediate courses completion.
To Book Free Demo,Please Call - 8884166608/9740557058/9738001024.
Education Articles1. Learn Yoga At Yoga Retreat Paros
Author: Lee Pate
2. How To Build A Career In Networking?
3. Nail It With Your Nails
4. Agile Training Importance For Organization
5. Mahadbt Scholarship How To Apply Online
Author: MahaDBT Site
6. How Can Fresher Start To Learn About Quorum?
Author: Block chain council
7. Governance In An Organization Is Not A Magic
Author: Brody Lukas
8. Reasons Why You Should Learn Selenium?
9. Find Education Hubs Near You
Author: Vivek Kumar
10. Benefits Of Enrolling In The One Year Mba Course For Professionals
Author: Krutika Sharma
11. 7 Reasons Why You Should Do A Digital Marketing Course
Author: Yogesh Sashi
12. How Sports Help Children To Be In Good Health?
13. How To Make The First Day Of The School Of Your Child A Fun?
14. How To Find Free Scholarships
Author: Student FinTech
15. Instant Reply Student Loans
Author: Student FinTech