Skip to main content

Why Angular 2.0?


Before accepting into added altercation about Angular 2.0 (which has an estimated absolution date of the end of 2015), let’s briefly accede the aesthetics abaft the new version. Angular 2.0 development was started to abode the afterward concerns:

Mobile
 
The new Angular adaptation will be focused on the development of adaptable apps. The account is that it’s easier to handle the desktop aspect of things, already the challenges accompanying to adaptable (performance, amount time, etc.) accept been addressed.

Modular
 
Various modules will be removed from Angular’s core, consistent in bigger performance. These will acquisition their way into Angular’s ever-growing ecosystem of modules, acceptation you’ll be able to aces and accept the locations you need.

Modern 

Angular 2.0 will ambition ES6 and “evergreen” avant-garde browsers (those automatically adapted to the latest version). Building for these browsers agency that assorted hacks and workarounds that accomplish Angular harder to advance can be alone acceptance developers to focus on the cipher accompanying to their business domain.

What’s the Controversy?

During the ng-conference there was no acknowledgment of a clearing aisle to adaptation 2.0. It was aswell acicular out that the jump to 2.0 adaptation will advance to torn Angular 1.3 apps, as there won’t be any backwards compatibility. Since then, the developer association has been abuzz with ambiguity and speculation, with some developers analytic if it’s even account starting a new Angular 1.3 project.

What Are the Changes?

AtScript
 
AtScript is a superset of ES6 and it’s getting acclimated to advance Angular 2.0. It’s candy by the Traceur compiler (along with ES6) to aftermath ES5 cipher and uses TypeScript’s blazon syntax to accomplish runtime blazon assertions instead of abridge time checks. However, AtScript isn’t compulsory—you will still be able to use credible JavaScript/ES5 cipher instead of AtScript to abode Angular apps.

Improved Dependency Bang (DI) 

Dependency bang (a software architectonics arrangement in which an article is anesthetized its dependencies, rather than creating them itself) was one of the factors that initially differentiated Angular from its competitors. It is decidedly benign in agreement of modular development and basal isolation, yet its accomplishing was bedeviled with problems in Angular 1.x. Angular 2.0 will will abode these issues, as able-bodied as abacus missing appearance such as adolescent injectors and lifetime/scope control.

Annotations 

AtScript provides accoutrement for advertence metadata with functions. This facilitates the architectonics of article instances by accouterment the appropriate advice to the DI library (which will analysis for associated metadata if calling a action or creating an instance of a class). It will be aswell simple to override constant abstracts by bartering an Inject annotation.

Child Injectors

A adolescent injector inherits all the casework of its ancestor with the adequacy of cardinal them at the adolescent level. According to requirement, altered types of altar can be alleged out and automatically overridden in assorted scopes.

Instance Scope

The bigger DI library will affection instance ambit control, which will become even added able if acclimated with adolescent injectors and your own ambit identifiers.

Templating and Abstracts Binding

Let’s yield a attending at templating and abstracts bounden as they go duke in duke if developing apps.

Dynamic Loading

This is a affection which is missing from the accepted adaptation of Angular. It will be addressed by Angular 2.0, which will let developers add new directives or controllers on the fly.

Templating
 
In Angular 2.0, the arrangement accumulation action will be asynchronous. As the cipher is based on the ES6 bore spec, the bore loader will amount dependencies by artlessly referencing them in the basal definition.

Directives 

In Angular 2.0 there will be three kinds of directives:

Basal Directives – These will actualize reusable apparatus by encapsulating argumentation in JavaScript, HTML or an alternative CSS appearance sheet.
Decorator Directives – These directives will be acclimated to adorn elements (for archetype abacus a tooltip, or showing/hiding elements appliance ng-show/ng-hide).

Arrangement Directives – These will about-face HTML into a reusable template. The instantiating of the arrangement and its admittance into the DOM can be absolutely controlled by the charge author. Examples cover ng-if and ng-repeat. 

Comments

Popular posts from this blog

How to use ng-href directive in AngularJS

ng-Href Directive                  ng-Href directive is hyper link markup to a text in angularJs. This hyperlink will change able to implement dynamic url {{hash}} value. Hash value to assign in a controller to happened user click event fire to assign dynamic url. This Value is undefined means it will return to 404 page. ng-Href directive Example  HTML:      <div ng-app="anchor">     <div ng-controller="anchorController">         <a ng-href="http://www.google.com" ng-click="show($event)">Anchor Tag</a>     </div>   </div> Javascript :  var anch = angular.module('anchor', []); anch.controller('anchorController',['$scope', '$window', function($scope, $window){     $scope.show = function(obj) {       $window.open(obj.target.href);     } }]); Result :  Demo

A simple start and stop timer counter in angularjs

     AngularJs using to create a start and stop counting timer functionality application. This application is need the following directive like $interval and $filter , We create default time object is display current timer clock functions.         A timer counter is have three functionality as below that start, stop and reset. A start function is called to start the $ interval directive to active so now counter is begin, This moment you are unable to proceed a reset logic.         Stop function is is call to $ interval belongs one of the method like cancel , This method make corresponding active interval prose is stop it. Reset function is call to reset all scope value is to be zero. HTML: <div ng-app="timerApp">     <div ng-controller="timerController">         Current Time : {{time}} <br/>         <hr/>                <Button ng-click="timer_start()">Start</Button>         <Button ng-click=&

How has lockdown impacted Indian farmers?

How has lockdown impacted Indian farmers?             Generally compare to other sectors it's not major impacted by our Indian farmers but we acceptable minor impacts. Here we separate major two farming cultures one is mono farming culture another one poly farming culture. Mono farming :             The major impacts from our Indian farmer for monoculture. Here I have briefly explained what are the things we had faced our local farmers. Here I explain two different crops type: Daily crops : * We harvest more than 100-kilo grams daily crops like brinjal but we unable to sell those in local markets. * We are unable to reach urban markets. * We don't have enough transport facilities. * We unable buy require fertilizer and other complements * In the early stage we are facing manpower shortage but later it's not an issue. * We unable to do value-added products. * Waste is very high for somedays Sessional Crops: * We major affect transport pr