Which React CSS frameworks are ready for production

AngularJS vs Angular [closed]

First of all, let me say I am assuming that you and anyone who will read this are already familiar with Angular 1 (now Called AngularJS , in contrast to Angular for the newer versions) are satisfied. Still, let's dive into some of the additions and key differences in Angular 2+.

  1. They added an angle.

You can start a new project by running it. You can operate your project by doing more information here: https://github.com/angular/angular-cli

  1. Your angle code is written in ES6 Typescript and is compiled with Javascript in the browser at runtime.

To fully understand this, I recommend reading some of the resource lists I have at the end of my answer.

  1. Project structure

In a basic structure, you have a folder where you do most of the work and a folder with an extension in the folder files. You "map" your ".ts" files to your browser for debugging because your browser cannot read native typescript.

Update : It's out of beta. The project structure has changed somewhat in most cases. If you're using the Angle CLI, you're working in the folder. In a starter project, you have the following.

app.component.css : CSS file that you should use specifically for

app.component.html : A view (variable declared in app.component.js)

app.component.spec.ts : is used for testing

app.component.ts : Your code to the is bound

app.module.ts : This is the starting signal for your app and where you define all plugins, components, services, etc. This corresponds to that in Angular 1

index.ts for defining or exporting project files

Additional Information:
Pro tip: You can generate new services, components, pipes, and so on.

The file is also important as it defines TS compilation rules for your project.

When you think, do i have to learn a whole new language? ... Uh ... TypeScript is kind of a superset of JavaScript. Do not be intimidated; It's there to make your development easier. I felt like after just a few hours I understood it well and after 3 days I had everything done.

  1. They bind to your HTML code similar to an Angular 1 directive. As variable as and out of date.

This one you may have implied. Angular 2 is still a MV *, but you use " Components "to bind code to your templates. Take the following for example

Think of the statement here as your dependency injection in a v1 controller. You use this Option to Your packages too import that says you want to create one that you want to bind to yours.

Notice the decorator that you have one and have. Think of this as yours using as you are using v1, where the name of is what you use to bind to your HTML as follows

Where is the name of your custom tag that you are using that acts as a placeholder for what is declared in your template? ie). While in version 1 this would look like this:

HTML

JS

You can also add something between these tags to generate a loading message like this:

Then it will be " Load ... " as Loading notification displayed.

Notice that it is declared in the path or in the raw HTML code that you use in your tag.


A more comprehensive implementation of Angular 1 would look more like this:

HTML

In v1 it would look something like this

JS

I like that very much about v2. I found that version 1 directive was a steep learning curve for me, and even when I figured it out, I often didn't get the rendering as I intended. I find that a lot easier.

V2 allows for easier scalability of your app as you can split your app more easily than in version 1. I like this approach because you can have all of your working parts in one file instead of having several in angle v1.

What about converting your project from v1 to v2?


From what I've heard from the development team, if you want to upgrade your v1 project to v2 all you will be doing is deleting stale blobs and replacing your s with s. I found this video helpful. It is with some of the Ionic teams working side by side with the Angular team as v2 has a greater focus on mobile https://youtu.be/OZg4M_nWuIk. I hope this helps.

UPDATE: I've updated by adding examples as official implementations of Angular 2 have emerged.

UPDATE 2: This still seems like a popular question so I just thought I had a resource that I found very helpful when I started working with Angular 2.

For more information on ES6, see the ECMAScript 6 / ES6 New Features in The New Boston - YouTube Playlist tutorials

To write Typescript functions and see how they are compiled to Javascript, visit the Typescript Language Playground

For information on the functional breakdown of Angular 1 equivalency in Angular 2, see the Quick Reference Guide Angular.io - Cookbook -A1 A2