اشتراک‌ها
Angular 2 برای توسعه دهنده‌های Angular 1
// Angular 1
const module = angular.module('myModule', []);
module.service('UserService', ['$http', function ($http) {  
  this.getUsers = () => {
    return $http.get('http://api.mywebsite.com/users')
                .then(res => res.data)
                .catch(res => new Error(res.data.error));
  }
}]);

/***************************************************************/

// Angular 2
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';

@Injectable()
class UserService { 
  constructor(private http: Http) {}
  
  getUsers(): Observable<User[]> {
    return this.http.get('http://api.mywebsite.com/users')
                    .map((res: Response) => res.json())
                    .catch((res: Response) => Observable.throw(res.json().error);
  }  
}
Angular 2 برای توسعه دهنده‌های Angular 1
اشتراک‌ها
قدم به قدم آموزش Angular 2، TypeScript و ASP.NET Core

این لینک به صورت قدم به قدم آموزش داده است که چطور می‌توانید با تکنولوژی‌های  Angular 2، TypeScript و ASP.NET Core  برنامه تولید کنید. بنابراین با خواندن این پست و انجام مراحل شما یک محصول کامل خواهید نوشت.
 

قدم به قدم آموزش  Angular 2، TypeScript و ASP.NET Core
اشتراک‌ها
Angular 2 و TypeScript در ویژوال استدیو

Last week, at ng-conf, the Angular team at Google provided the web developer world with an update on the state of Angular 2. They were joined on stage by a member of the TypeScript team, Jonathan Turner, to also announce that Angular 2 will be built using TypeScript. Jonathan then demoed a preview of the upcoming TypeScript 1.5 release via an Angular 2 sample application. 

Angular 2 و TypeScript در ویژوال استدیو