docs: branding fixes (#14132)

Angular 1.x -> AngularJS
Angular 1 -> AngularJS
Angular1 -> AngularJS
Angular 2+ -> Angular
Angular 2.0 -> Angular
Angular2 -> Angular

I have deliberately not touched any of the symbol names as that would cause big merge collisions with Tobias's work.

All the renames are in .md, .json, and inline comments and jsdocs.

PR Close #14132
This commit is contained in:
Igor Minar 2017-01-26 22:30:42 -08:00 committed by Miško Hevery
parent 5a997ef4f0
commit da41a954b5
70 changed files with 235 additions and 244 deletions

View File

@ -363,7 +363,7 @@ Note: 4.0.0-beta.0 release also contains all the changes present in the 2.3.1 re
* **selector:** SelectorMatcher match elements with :not selector ([#12977](https://github.com/angular/angular/issues/12977)) ([392c9ac](https://github.com/angular/angular/commit/392c9ac))
* **tsc-wrapped:** generate metadata for exports without module specifier ([cd03c77](https://github.com/angular/angular/commit/cd03c77)), closes [#13327](https://github.com/angular/angular/issues/13327)
* **upgrade:** fix downgrade content projection and injector inheritance ([86c5098](https://github.com/angular/angular/commit/86c5098)), closes [#6629](https://github.com/angular/angular/issues/6629) [#7727](https://github.com/angular/angular/issues/7727) [#8729](https://github.com/angular/angular/issues/8729) [#9643](https://github.com/angular/angular/issues/9643) [#9649](https://github.com/angular/angular/issues/9649) [#12675](https://github.com/angular/angular/issues/12675)
* **upgrade:** enable Angular 1 unit testing of upgrade module ([2fc0560](https://github.com/angular/angular/commit/2fc0560)), closes [#5462](https://github.com/angular/angular/issues/5462) [#12675](https://github.com/angular/angular/issues/12675)
* **upgrade:** enable AngularJS unit testing of upgrade module ([2fc0560](https://github.com/angular/angular/commit/2fc0560)), closes [#5462](https://github.com/angular/angular/issues/5462) [#12675](https://github.com/angular/angular/issues/12675)
### Performance Improvements
@ -402,7 +402,7 @@ We are adding more tests to our test suite to catch these kinds of problems befo
* **router:** fix skipLocationChanges on RouterLink directives ([f562cbf](https://github.com/angular/angular/commit/f562cbf)), closes [#13156](https://github.com/angular/angular/issues/13156)
* **router:** make setUpLocationChangeListener idempotent ([25e5b2f](https://github.com/angular/angular/commit/25e5b2f))
* **router:** runs guards every time when unsuccessfully navigating to the same url over and over again ([#13209](https://github.com/angular/angular/issues/13209)) ([d46b8de](https://github.com/angular/angular/commit/d46b8de))
* **router:** throw a better error message when angular 1 is not bootstraped ([c767df0](https://github.com/angular/angular/commit/c767df0))
* **router:** throw a better error message when AngularJS is not bootstraped ([c767df0](https://github.com/angular/angular/commit/c767df0))
* **router:** validate nested routes ([#13224](https://github.com/angular/angular/issues/13224)) ([2893c2c](https://github.com/angular/angular/commit/2893c2c)), closes [#12827](https://github.com/angular/angular/issues/12827)
* **tsc-wrapped:** have UserError display the actual error ([393c100](https://github.com/angular/angular/commit/393c100))
@ -2030,7 +2030,7 @@ The likelihood of anyone actually depending on this property is very low.
### Known Issues
*** SECURITY WARNING ***
Contextual escaping is not yet implemented in Angular 2. This will be fixed in the upcoming RC.
Contextual escaping is not yet implemented in Angular. This will be fixed in the upcoming RC.
In the meantime make sure to correctly escape all values that go into the DOM.
*** SECURITY WARNING ***
@ -2393,7 +2393,7 @@ it('should wait for returned promises', async(() => {
* **payload:** increase payload size limit temporarily ([28e657d](https://github.com/angular/angular/commit/28e657d))
* **RouterLink:** ignore optional parameters when checking for active routes ([5e2bc5c](https://github.com/angular/angular/commit/5e2bc5c)), closes [#6459](https://github.com/angular/angular/issues/6459) [#7834](https://github.com/angular/angular/issues/7834)
* **select:** set value individually from ngModel ([e1e44a9](https://github.com/angular/angular/commit/e1e44a9)), closes [#7975](https://github.com/angular/angular/issues/7975) [#7978](https://github.com/angular/angular/issues/7978)
* **upgrade:** make upgradeAdapter upgrade angular 1 components correctly ([247964a](https://github.com/angular/angular/commit/247964a)), closes [#7951](https://github.com/angular/angular/issues/7951)
* **upgrade:** make upgradeAdapter upgrade AngularJS components correctly ([247964a](https://github.com/angular/angular/commit/247964a)), closes [#7951](https://github.com/angular/angular/issues/7951)
### Features
@ -2970,7 +2970,7 @@ setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS,
* `angular2.umd.js` -> `angular2-all.umd.js`
* `angular2-testing.umd.js` -> `angular2-all-testing.umd.js`
* RxJS used to be bundled with Angular 2 code and this is not the case
* RxJS used to be bundled with Angular code and this is not the case
any more. RxJS needs to be loaded explicitly.
* Previously `angular2.js`, `angular2.min.js` and `angular2.dev.js` bundles
@ -4137,8 +4137,8 @@ class HelloCmp implements OnInit {
* **docs:** export type info for var and const exports ([9262727](https://github.com/angular/angular/commit/9262727)), closes [#3700](https://github.com/angular/angular/issues/3700)
* **facade:** add maximum method for ListWrapper ([b5c4d8b](https://github.com/angular/angular/commit/b5c4d8b))
* **http:** xhr error listener invokes throw on EventEmitter ([f2d3bdb](https://github.com/angular/angular/commit/f2d3bdb)), closes [#2667](https://github.com/angular/angular/issues/2667)
* **router:** add angular 1.x router ([fde026a](https://github.com/angular/angular/commit/fde026a))
* **router:** add reuse support for angular 1.x router ([ddb62fe](https://github.com/angular/angular/commit/ddb62fe)), closes [#3698](https://github.com/angular/angular/issues/3698)
* **router:** add AngularJS router ([fde026a](https://github.com/angular/angular/commit/fde026a))
* **router:** add reuse support for AngularJS router ([ddb62fe](https://github.com/angular/angular/commit/ddb62fe)), closes [#3698](https://github.com/angular/angular/issues/3698)
* **url_resolver:** Allow a developer to customize their package prefix ([9cc1cd2](https://github.com/angular/angular/commit/9cc1cd2)), closes [#3794](https://github.com/angular/angular/issues/3794)

View File

@ -1,4 +1,4 @@
# Pushing changes into the Angular 2 tree
# Pushing changes into the Angular tree
Please see [Using git with Angular repositories](https://docs.google.com/document/d/1h8nijFSaa1jG_UE8v4WP7glh5qOUXnYtAtJh_gwOQHI/edit)
for details about how we maintain a linear commit history, and the rules for committing.

View File

@ -1,7 +1,7 @@
Naming Conventions in Angular2
Naming Conventions in Angular
---
In general Angular2 should follow TypeScript naming conventions.
In general Angular should follow TypeScript naming conventions.
See: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines

View File

@ -5,16 +5,13 @@
[![Issue Stats](http://issuestats.com/github/angular/angular/badge/issue?style=flat)](http://issuestats.com/github/angular/angular)
[![npm version](https://badge.fury.io/js/%40angular%2Fcore.svg)](https://badge.fury.io/js/%40angular%2Fcore)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/angular2-ci.svg)](https://saucelabs.com/u/angular2-ci)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/angular2-ci.svg)](https://saucelabs.com/u/angular2-ci)
*Safari (7+), iOS (7+), Edge (14) and IE mobile (11) are tested on [BrowserStack][browserstack].*
Angular
=========
Angular is a development platform for building mobile and desktop web applications. This is the
repository for [Angular 2][ng2] Typescript/JavaScript (JS).
Angular2 for [Dart][dart] can be found at [dart-lang/angular2][ng2dart].
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript (JS) and other languages.
## Quickstart
@ -29,9 +26,5 @@ guidelines for [contributing][contributing] and then check out one of our issues
[browserstack]: https://www.browserstack.com/
[contributing]: http://github.com/angular/angular/blob/master/CONTRIBUTING.md
[dart]: http://www.dartlang.org
[quickstart]: https://angular.io/docs/ts/latest/quickstart.html
[ng2]: http://angular.io
[ngDart]: http://angulardart.org
[ngJS]: http://angularjs.org
[ng2dart]: https://github.com/dart-lang/angular2
[ng]: http://angular.io

View File

@ -1,4 +1,4 @@
# Developer Tools for Angular 2
# Developer Tools for Angular
Here you will find a collection of tools and tips for keeping your application
perform well and contain fewer bugs.

View File

@ -1,4 +1,4 @@
# Triage Process and Github Labels for Angular 2
# Triage Process and Github Labels for Angular
This document describes how the Angular team uses labels and milestones
to triage issues on github. The basic idea of the process is that
@ -71,7 +71,7 @@ issues within the component will be resolved.
Several owners have adopted the issue categorization based on
[user pain](http://www.lostgarden.com/2008/05/improving-bug-triage-with-user-pain.html)
used by Angular 1. In this system every issue is assigned frequency and
used by AngularJS. In this system every issue is assigned frequency and
severity based on which the total user pain score is calculated.
Following is the definition of various frequency and severity levels:

View File

@ -1,5 +1,5 @@
{
"name": "angular2",
"name": "angular",
"dependencies": {
"polymer": "Polymer/polymer#^1.6.0"
}

View File

@ -3,7 +3,7 @@
Benchpress is a framework for e2e performance tests.
See [here for an example project](https://github.com/angular/benchpress-tree).
The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
License: MIT

View File

@ -105,19 +105,19 @@ This program mimics the TypeScript tsc command line. It accepts a `-p` flag whic
This CLI is intended for demos, prototyping, or for users with simple build systems
that run bare `tsc`.
Users with a build system should expect an Angular 2 template plugin. Such a plugin would be
Users with a build system should expect an Angular template plugin. Such a plugin would be
based on the `index.ts` in this directory, but should share the TypeScript compiler instance
with the one already used in the plugin for TypeScript typechecking and emit.
## Design
At a high level, this program
- collects static metadata about the sources using the `tsc-wrapped` package in angular2
- uses the `OfflineCompiler` from `angular2/src/compiler/compiler` to codegen additional `.ts` files
- collects static metadata about the sources using the `tsc-wrapped` package
- uses the `OfflineCompiler` from `@angular/compiler` to codegen additional `.ts` files
- these `.ts` files are written to the `genDir` path, then compiled together with the application.
## For developers
```
# Build angular2 and the compiler
# Build Angular and the compiler
./build.sh
# Copy over the package so we can test the compiler tests

View File

@ -22,7 +22,7 @@ import {PathMappedCompilerHost} from './path_mapped_compiler_host';
const GENERATED_META_FILES = /\.json$/;
const PREAMBLE = `/**
* @fileoverview This file is generated by the Angular 2 template compiler.
* @fileoverview This file is generated by the Angular template compiler.
* Do not edit.
* @suppress {suspiciousCode,uselessCode,missingProperties}
*/

View File

@ -23,7 +23,7 @@ export class ResolvedStaticSymbol {
export interface StaticSymbolResolverHost {
/**
* Return a ModuleMetadata for the given module.
* Angular 2 CLI will produce this metadata for a module whenever a .d.ts files is
* Angular CLI will produce this metadata for a module whenever a .d.ts files is
* produced and the module has exported variables or classes with decorators. Module metadata can
* also be produced directly from TypeScript sources by using MetadataCollector in tools/metadata.
*

View File

@ -88,7 +88,7 @@ export class Compiler {
* Exposes the CSS-style selectors that have been used in `ngContent` directives within
* the template of the given component.
* This is used by the `upgrade` library to compile the appropriate transclude content
* in the Angular 1 wrapper component.
* in the AngularJS wrapper component.
*/
getNgContentSelectors(component: Type<any>): string[] { throw _throwError(); }

View File

@ -1,6 +1,6 @@
# Dependency Injection (DI): Documentation
This document describes in detail how the DI module works in Angular 2.
This document describes in detail how the DI module works in Angular.
## Core Abstractions

View File

@ -28,7 +28,7 @@ Every key has an id, which we utilize to store providers and instances. So Injec
### ProtoInjector and Injector
Often there is a need to create multiple instances of essentially the same injector. In Angular 2, for example, every component element type gets an injector configured in the same way.
Often there is a need to create multiple instances of essentially the same injector. In Angular, for example, every component element type gets an injector configured in the same way.
Doing the following would be very inefficient.
@ -148,9 +148,9 @@ parent.get(Car); // this works
regularChild.get(Car); // this works
```
## Angular 2 and DI
## Angular and DI
Now let's see how Angular 2 uses DI behind the scenes.
Now let's see how Angular uses DI behind the scenes.
The right mental model is to think that every DOM element has an Injector. (In practice, only interesting elements containing directives will have an injector, but this is a performance optimization)

View File

@ -1,16 +1,16 @@
# WebWorkers in Angular 2: Documentation
# WebWorkers in Angular: Documentation
Angular 2 includes native support for writing applications which live in a
Angular includes native support for writing applications which live in a
WebWorker. This document describes how to write applications that take advantage
of this feature.
It also provides a detailed description of the underlying messaging
infrastructure that angular uses to communicate between the main process and the
worker. This infrastructure can be modified by an application developer to
enable driving an angular 2 application from an iFrame, different window / tab,
enable driving an Angular application from an iFrame, different window / tab,
server, etc..
## Introduction
WebWorker support in Angular2 is designed to make it easy to leverage parallelization in your web application.
WebWorker support in Angular is designed to make it easy to leverage parallelization in your web application.
When you choose to run your application in a WebWorker angular runs both your application's logic and the
majority of the core angular framework in a WebWorker.
By offloading as much code as possible to the WebWorker we keep the UI thread
@ -20,7 +20,7 @@ better framerate and UX for applications.
## Bootstrapping a WebWorker Application
Bootstrapping a WebWorker application is not much different than bootstrapping a normal application.
The main difference is that you need to do the bootstrap process on both the worker and render thread.
Unlike in a standard Angular2 application you don't bootstrap your main component on the render thread.
Unlike in a standard Angular application you don't bootstrap your main component on the render thread.
Instead you initialize a new application injector with the WORKER_APP_PLATFORM providers and provide the name
of your WebWorker script. See the example below for details:
@ -79,13 +79,13 @@ run specifically on the UI or Worker. Additionally, they contain the core messag
communicate between the Worker and the UI. This messaging code is not in the standard angular2.js file.
* We pass `loader.js` to our application injector using the WORKER_SCRIPT symbol. This tells angular that our WebWorkers's init script is located at `loader.js`.
You can think of `loader.js` as the index.html file for the WebWorker.
Since WebWorkers share no memory with the UI we need to reload the angular2 dependencies before
Since WebWorkers share no memory with the UI we need to reload the Angular dependencies before
bootstrapping our application. We do this with `importScripts`. Additionally, we need to do this in a different
file than `app.ts` because our module loader (System.js in this example) has not been loaded yet, and `app.ts`
will be compiled with a `System.define` call at the top.
* The HelloWorld Component looks exactly like a normal Angular2 HelloWorld Component! The goal of WebWorker
* The HelloWorld Component looks exactly like a normal Angular HelloWorld Component! The goal of WebWorker
support was to allow as much of Angular to live in the worker as possible.
As such, *most* angular2 components can be bootstrapped in a WebWorker with minimal to no changes required.
As such, *most* Angular components can be bootstrapped in a WebWorker with minimal to no changes required.
For reference, here's the same HelloWorld example in Dart.
```HTML
@ -140,13 +140,13 @@ can communicate with the Isolate that spawned it. You need to provide this `Send
so that Angular can communicate with the UI.
* You need to set up `ReflectionCapabilities` on both the UI and Worker. Just like writing non-concurrent
Angular2 Dart applications you need to set up the reflector. You should not use Reflection in production,
but should use the angular 2 transformer to remove it in your final JS code. Note there's currently a bug
but should use the Angular transformer to remove it in your final JS code. Note there's currently a bug
with running the transformer on your UI code (#3971). You can (and should) pass the file where you call
`bootstrap` as an entry point to the transformer, but you should not pass your UI index file
to the transformer until that bug is fixed.
## Writing WebWorker Compatible Components
You can do almost everything in a WebWorker component that you can do in a typical Angular 2 Component.
You can do almost everything in a WebWorker component that you can do in a typical Angular Component.
The main exception is that there is **no** DOM access from a WebWorker component. In Dart this means you can't
import anything from `dart:html` and in JavaScript it means you can't use `document` or `window`. Instead you
should use data bindings and if needed you can inject the `Renderer` along with your component's `ElementRef`

View File

@ -15,13 +15,13 @@ interface Hero {
description: string;
}
// #docregion Angular 2 Stuff
// #docregion Angular Stuff
// #docregion ng2-heroes
// This Angular 2 component will be "downgraded" to be used in Angular 1
// This Angular component will be "downgraded" to be used in AngularJS
@Component({
selector: 'ng2-heroes',
// This template uses the upgraded `ng1-hero` component
// Note that because its element is compiled by Angular 2+ we must use camelCased attribute names
// Note that because its element is compiled by Angular we must use camelCased attribute names
template: `<h1>Heroes</h1>
<p><ng-content></ng-content></p>
<div *ngFor="let hero of heroes">
@ -37,7 +37,7 @@ class Ng2HeroesComponent {
// #enddocregion
// #docregion ng2-heroes-service
// This Angular 2 service will be "downgraded" to be used in Angular 1
// This Angular service will be "downgraded" to be used in AngularJS
@Injectable()
class HeroesService {
heroes: Hero[] = [
@ -48,7 +48,7 @@ class HeroesService {
// #docregion use-ng1-upgraded-service
constructor(@Inject('titleCase') titleCase: (v: string) => string) {
// Change all the hero names to title case, using the "upgraded" Angular 1 service
// Change all the hero names to title case, using the "upgraded" AngularJS service
this.heroes.forEach((hero: Hero) => hero.name = titleCase(hero.name));
}
// #enddocregion
@ -63,16 +63,16 @@ class HeroesService {
// #enddocregion
// #docregion ng1-hero-wrapper
// This Angular 2 directive will act as an interface to the "upgraded" Angular 1 component
// This Angular directive will act as an interface to the "upgraded" AngularJS component
@Directive({selector: 'ng1-hero'})
class Ng1HeroComponentWrapper extends UpgradeComponent implements OnInit, OnChanges, DoCheck,
OnDestroy {
// The names of the input and output properties here must match the names of the
// `<` and `&` bindings in the Angular 1 component that is being wrapped
// `<` and `&` bindings in the AngularJS component that is being wrapped
@Input() hero: Hero;
@Output() onRemove: EventEmitter<void>;
constructor(@Inject(ElementRef) elementRef: ElementRef, @Inject(Injector) injector: Injector) {
// We must pass the name of the directive as used by Angular 1 to the super
// We must pass the name of the directive as used by AngularJS to the super
super('ng1Hero', elementRef, injector);
}
@ -89,19 +89,19 @@ class Ng1HeroComponentWrapper extends UpgradeComponent implements OnInit, OnChan
// #enddocregion
// #docregion ng2-module
// This NgModule represents the Angular 2 pieces of the application
// This NgModule represents the Angular pieces of the application
@NgModule({
declarations: [Ng2HeroesComponent, Ng1HeroComponentWrapper],
providers: [
HeroesService,
// #docregion upgrade-ng1-service
// Register an Angular 2+ provider whose value is the "upgraded" Angular 1 service
// Register an Angular provider whose value is the "upgraded" AngularJS service
{provide: 'titleCase', useFactory: (i: any) => i.get('titleCase'), deps: ['$injector']}
// #enddocregion
],
// All components that are to be "downgraded" must be declared as `entryComponents`
entryComponents: [Ng2HeroesComponent],
// We must import `UpgradeModule` to get access to the Angular 1 core services
// We must import `UpgradeModule` to get access to the AngularJS core services
imports: [BrowserModule, UpgradeModule]
})
class Ng2AppModule {
@ -114,12 +114,12 @@ class Ng2AppModule {
// #docregion Angular 1 Stuff
// #docregion ng1-module
// This Angular 1 module represents the Angular 1 pieces of the application
// This Angular 1 module represents the AngularJS pieces of the application
const ng1AppModule = angular.module('ng1AppModule', []);
// #enddocregion
// #docregion ng1-hero
// This Angular 1 component will be "upgraded" to be used in Angular 2+
// This AngularJS component will be "upgraded" to be used in Angular
ng1AppModule.component('ng1Hero', {
bindings: {hero: '<', onRemove: '&'},
transclude: true,
@ -131,19 +131,19 @@ ng1AppModule.component('ng1Hero', {
// #enddocregion
// #docregion ng1-title-case-service
// This Angular 1 service will be "upgraded" to be used in Angular 2+
// This AngularJS service will be "upgraded" to be used in Angular
ng1AppModule.factory(
'titleCase',
() => (value: string) => value.replace(/((^|\s)[a-z])/g, (_, c) => c.toUpperCase()));
// #enddocregion
// #docregion downgrade-ng2-heroes-service
// Register an Angular 1 service, whose value is the "downgraded" Angular 2+ injectable.
// Register an AngularJS service, whose value is the "downgraded" Angular injectable.
ng1AppModule.factory('heroesService', downgradeInjectable(HeroesService));
// #enddocregion
// #docregion ng2-heroes-wrapper
// This is directive will act as the interface to the "downgraded" Angular 2+ component
// This is directive will act as the interface to the "downgraded" Angular component
ng1AppModule.directive(
'ng2Heroes',
downgradeComponent(
@ -155,14 +155,14 @@ ng1AppModule.directive(
// #docregion example-app
// This is our top level application component
ng1AppModule.component('exampleApp', {
// We inject the "downgraded" HeroesService into this Angular 1 component
// (We don't need the `HeroesService` type for Angular 1 DI - it just helps with TypeScript
// We inject the "downgraded" HeroesService into this AngularJS component
// (We don't need the `HeroesService` type for AngularJS DI - it just helps with TypeScript
// compilation)
controller: [
'heroesService', function(heroesService: HeroesService) { this.heroesService = heroesService; }
],
// This template make use of the downgraded `ng2-heroes` component
// Note that because its element is compiled by Angular 1 we must use kebab-case attributes for
// Note that because its element is compiled by AngularJS we must use kebab-case attributes for
// inputs and outputs
template: `<link rel="stylesheet" href="./styles.css">
<ng2-heroes [heroes]="$ctrl.heroesService.heroes" (add-hero)="$ctrl.heroesService.addHero()" (remove-hero)="$ctrl.heroesService.removeHero($event)">
@ -174,10 +174,10 @@ ng1AppModule.component('exampleApp', {
// #docregion bootstrap
// First we bootstrap the Angular 2 HybridModule
// First we bootstrap the Angular HybridModule
// (We are using the dynamic browser platform as this example has not been compiled AoT)
platformBrowserDynamic().bootstrapModule(Ng2AppModule).then(ref => {
// Once Angular 2 bootstrap is complete then we bootstrap the Angular 1 module
// Once Angular bootstrap is complete then we bootstrap the AngularJS module
const upgrade = ref.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, [ng1AppModule.name]);
});

View File

@ -1,7 +1,7 @@
{
"name": "@angular/language-service",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular 2 - language services",
"description": "Angular - language services",
"main": "bundles/language-service.umd.js",
"module": "index.js",
"typings": "index.d.ts",

View File

@ -10,7 +10,7 @@ import {getDOM} from '../dom/dom_adapter';
/**
* A service that can be used to get and set the title of a current HTML document.
*
* Since an Angular 2 application can't be bootstrapped on the entire HTML document (`<html>` tag)
* Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
* it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
* (representing the `<title>` tag). Instead, this service can be used to set and get the current
* title value.

View File

@ -14,7 +14,7 @@ import {AngularTools} from './common_tools';
const context = <any>global;
/**
* Enabled Angular 2 debug tools that are accessible via your browser's
* Enabled Angular debug tools that are accessible via your browser's
* developer console.
*
* Usage:
@ -32,7 +32,7 @@ export function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {
}
/**
* Disables Angular 2 tools.
* Disables Angular tools.
*
* @experimental All debugging apis are currently experimental.
*/

View File

@ -6,7 +6,6 @@
"module": "index.js",
"typings": "index.d.ts",
"keywords": [
"angular2",
"angular",
"router"
],

View File

@ -326,7 +326,7 @@ export class Router {
navigated: boolean = false;
/**
* Extracts and merges URLs. Used for Angular 1 to Angular 2 migrations.
* Extracts and merges URLs. Used for AngularJS to Angular migrations.
*/
urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();

View File

@ -110,7 +110,7 @@ export function routerNgProbeToken() {
* In addition, we often want to split applications into multiple bundles and load them on demand.
* Doing this transparently is not trivial.
*
* The Angular 2 router solves these problems. Using the router, you can declaratively specify
* The Angular router solves these problems. Using the router, you can declaratively specify
* application states, manage state transitions while taking care of the URL, and load bundles on
* demand.
*

View File

@ -9,7 +9,7 @@
import {UrlTree} from './url_tree';
/**
* @whatItDoes Provides a way to migrate Angular 1 applications to Angular 2.
* @whatItDoes Provides a way to migrate AngularJS applications to Angular.
*
* @experimental
*/

View File

@ -13,7 +13,7 @@ import {UpgradeModule} from '@angular/upgrade/static';
/**
* @whatItDoes Creates an initializer that in addition to setting up the Angular 2
* @whatItDoes Creates an initializer that in addition to setting up the Angular
* router sets up the ngRoute integration.
*
* @howToUse

View File

@ -21,19 +21,19 @@ let downgradeCount = 0;
* *Part of the [upgrade/static](/docs/ts/latest/api/#!?query=upgrade%2Fstatic)
* library for hybrid upgrade apps that support AoT compilation*
*
* Allows an Angular 2+ component to be used from Angular 1.
* Allows an Angular component to be used from AngularJS.
*
* @howToUse
*
* Let's assume that you have an Angular 2+ component called `ng2Heroes` that needs
* to be made available in Angular 1 templates.
* Let's assume that you have an Angular component called `ng2Heroes` that needs
* to be made available in AngularJS templates.
*
* {@example upgrade/static/ts/module.ts region="ng2-heroes"}
*
* We must create an Angular 1 [directive](https://docs.angularjs.org/guide/directive)
* that will make this Angular 2+ component available inside Angular 1 templates.
* We must create an AngularJS [directive](https://docs.angularjs.org/guide/directive)
* that will make this Angular component available inside AngularJS templates.
* The `downgradeComponent()` function returns a factory function that we
* can use to define the Angular 1 directive that wraps the "downgraded" component.
* can use to define the AngularJS directive that wraps the "downgraded" component.
*
* {@example upgrade/static/ts/module.ts region="ng2-heroes-wrapper"}
*
@ -42,13 +42,13 @@ let downgradeCount = 0;
* component has been removed from the code, and so cannot be inferred.
*
* We must do the following:
* * specify the Angular 2+ component class that is to be downgraded
* * specify all inputs and outputs that the Angular 1 component expects
* * specify the Angular component class that is to be downgraded
* * specify all inputs and outputs that the AngularJS component expects
*
* @description
*
* A helper function that returns a factory function to be used for registering an
* Angular 1 wrapper directive for "downgrading" an Angular 2+ component.
* AngularJS wrapper directive for "downgrading" an Angular component.
*
* The parameter contains information about the Component that is being downgraded:
*

View File

@ -15,7 +15,7 @@ import {INJECTOR_KEY} from './constants';
* *Part of the [upgrade/static](/docs/ts/latest/api/#!?query=upgrade%2Fstatic)
* library for hybrid upgrade apps that support AoT compilation*
*
* Allow an Angular 2+ service to be accessible from Angular 1.
* Allow an Angular service to be accessible from AngularJS.
*
* @howToUse
*
@ -30,23 +30,23 @@ import {INJECTOR_KEY} from './constants';
* {@example upgrade/static/ts/module.ts region="ng2-module"}
*
* Now we can register the `downgradeInjectable` factory function for the service
* on an Angular 1 module.
* on an AngularJS module.
*
* {@example upgrade/static/ts/module.ts region="downgrade-ng2-heroes-service"}
*
* Inside an Angular 1 component's controller we can get hold of the
* Inside an AngularJS component's controller we can get hold of the
* downgraded service via the name we gave when downgrading.
*
* {@example upgrade/static/ts/module.ts region="example-app"}
*
* @description
*
* Takes a `token` that identifies a service provided from Angular 2+.
* Takes a `token` that identifies a service provided from Angular.
*
* Returns a [factory function](https://docs.angularjs.org/guide/di) that can be
* used to register the service on an Angular 1 module.
* used to register the service on an AngularJS module.
*
* The factory function provides access to the Angular 2+ service that
* The factory function provides access to the Angular service that
* is identified by the `token` parameter.
*
* @experimental

View File

@ -49,17 +49,17 @@ type LifecycleHook = '$doCheck' | '$onChanges' | '$onDestroy' | '$onInit' | '$po
* *Part of the [upgrade/static](/docs/ts/latest/api/#!?query=upgrade%2Fstatic)
* library for hybrid upgrade apps that support AoT compilation*
*
* Allows an Angular 1 component to be used from Angular 2+.
* Allows an AngularJS component to be used from Angular.
*
* @howToUse
*
* Let's assume that you have an Angular 1 component called `ng1Hero` that needs
* to be made available in Angular 2+ templates.
* Let's assume that you have an AngularJS component called `ng1Hero` that needs
* to be made available in Angular templates.
*
* {@example upgrade/static/ts/module.ts region="ng1-hero"}
*
* We must create a {@link Directive} that will make this Angular 1 component
* available inside Angular 2+ templates.
* We must create a {@link Directive} that will make this AngularJS component
* available inside Angular templates.
*
* {@example upgrade/static/ts/module.ts region="ng1-hero-wrapper"}
*
@ -70,16 +70,16 @@ type LifecycleHook = '$doCheck' | '$onChanges' | '$onDestroy' | '$onInit' | '$po
*
* Note that we must do the following:
* * specify the directive's selector (`ng1-hero`)
* * specify all inputs and outputs that the Angular 1 component expects
* * specify all inputs and outputs that the AngularJS component expects
* * derive from `UpgradeComponent`
* * call the base class from the constructor, passing
* * the Angular 1 name of the component (`ng1Hero`)
* * the AngularJS name of the component (`ng1Hero`)
* * the {@link ElementRef} and {@link Injector} for the component wrapper
*
* @description
*
* A helper class that should be used as a base class for creating Angular directives
* that wrap Angular 1 components that need to be "upgraded".
* that wrap AngularJS components that need to be "upgraded".
*
* @experimental
*/
@ -108,7 +108,7 @@ export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
*
* {@example upgrade/static/ts/module.ts region="ng1-hero-wrapper" }
*
* * The `name` parameter should be the name of the Angular 1 directive.
* * The `name` parameter should be the name of the AngularJS directive.
* * The `elementRef` and `injector` parameters should be acquired from Angular by dependency
* injection into the base class constructor.
*
@ -131,7 +131,7 @@ export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
this.bindings = this.initializeBindings(this.directive);
this.linkFn = this.compileTemplate(this.directive);
// We ask for the Angular 1 scope from the Angular 2+ injector, since
// We ask for the AngularJS scope from the Angular injector, since
// we will put the new component scope onto the new injector for each component
const $parentScope = injector.get($SCOPE);
// QUESTION 1: Should we create an isolated scope if the scope is only true?

View File

@ -22,19 +22,19 @@ import {$$TESTABILITY, $DELEGATE, $INJECTOR, $PROVIDE, $ROOT_SCOPE, INJECTOR_KEY
* *Part of the [upgrade/static](/docs/ts/latest/api/#!?query=upgrade%2Fstatic)
* library for hybrid upgrade apps that support AoT compilation*
*
* Allows Angular 1 and Angular 2+ components to be used together inside a hybrid upgrade
* Allows AngularJS and Angular components to be used together inside a hybrid upgrade
* application, which supports AoT compilation.
*
* Specifically, the classes and functions in the `upgrade/static` module allow the following:
* 1. Creation of an Angular 2+ directive that wraps and exposes an Angular 1 component so
* that it can be used in an Angular 2 template. See {@link UpgradeComponent}.
* 2. Creation of an Angular 1 directive that wraps and exposes an Angular 2+ component so
* that it can be used in an Angular 1 template. See {@link downgradeComponent}.
* 3. Creation of an Angular 2+ root injector provider that wraps and exposes an Angular 1
* service so that it can be injected into an Angular 2+ context. See
* {@link UpgradeModule#upgrading-an-angular-1-service Upgrading an Angular 1 service} below.
* 4. Creation of an Angular 1 service that wraps and exposes an Angular 2+ injectable
* so that it can be injected into an Angular 1 context. See {@link downgradeInjectable}.
* 1. Creation of an Angular directive that wraps and exposes an AngularJS component so
* that it can be used in an Angular template. See {@link UpgradeComponent}.
* 2. Creation of an AngularJS directive that wraps and exposes an Angular component so
* that it can be used in an AngularJS template. See {@link downgradeComponent}.
* 3. Creation of an Angular root injector provider that wraps and exposes an AngularJS
* service so that it can be injected into an Angular context. See
* {@link UpgradeModule#upgrading-an-angular-1-service Upgrading an AngularJS service} below.
* 4. Creation of an AngularJS service that wraps and exposes an Angular injectable
* so that it can be injected into an AngularJS context. See {@link downgradeInjectable}.
* 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks
* coexisting in a single application. See the
* {@link UpgradeModule#example example} below.
@ -49,15 +49,15 @@ import {$$TESTABILITY, $DELEGATE, $INJECTOR, $PROVIDE, $ROOT_SCOPE, INJECTOR_KEY
* 2. Each DOM element on the page is owned exactly by one framework. Whichever framework
* instantiated the element is the owner. Each framework only updates/interacts with its own
* DOM elements and ignores others.
* 3. Angular 1 directives always execute inside the Angular 1 framework codebase regardless of
* 3. AngularJS directives always execute inside the AngularJS framework codebase regardless of
* where they are instantiated.
* 4. Angular 2+ components always execute inside the Angular 2+ framework codebase regardless of
* 4. Angular components always execute inside the Angular framework codebase regardless of
* where they are instantiated.
* 5. An Angular 1 component can be "upgraded"" to an Angular 2+ component. This is achieved by
* defining an Angular 2+ directive, which bootstraps the Angular 1 component at its location
* 5. An AngularJS component can be "upgraded"" to an Angular component. This is achieved by
* defining an Angular directive, which bootstraps the AngularJS component at its location
* in the DOM. See {@link UpgradeComponent}.
* 6. An Angular 2+ component can be "downgraded"" to an Angular 1 component. This is achieved by
* defining an Angular 1 directive, which bootstraps the Angular 2+ component at its location
* 6. An Angular component can be "downgraded"" to an AngularJS component. This is achieved by
* defining an AngularJS directive, which bootstraps the Angular component at its location
* in the DOM. See {@link downgradeComponent}.
* 7. Whenever an "upgraded"/"downgraded" component is instantiated the host element is owned by
* the framework doing the instantiation. The other framework then instantiates and owns the
@ -66,11 +66,11 @@ import {$$TESTABILITY, $DELEGATE, $INJECTOR, $PROVIDE, $ROOT_SCOPE, INJECTOR_KEY
* instantiation framework.
* b. The DOM attributes are parsed by the framework that owns the current template. So
* attributes
* in Angular 1 templates must use kebab-case, while Angular 1 templates must use camelCase.
* c. However the template binding syntax will always use the Angular 2+ style, e.g. square
* in AngularJS templates must use kebab-case, while AngularJS templates must use camelCase.
* c. However the template binding syntax will always use the Angular style, e.g. square
* brackets (`[...]`) for property binding.
* 8. Angular 1 is always bootstrapped first and owns the root component.
* 9. The new application is running in an Angular 2+ zone, and therefore it no longer needs calls
* 8. AngularJS is always bootstrapped first and owns the root component.
* 9. The new application is running in an Angular zone, and therefore it no longer needs calls
* to
* `$apply()`.
*
@ -79,60 +79,60 @@ import {$$TESTABILITY, $DELEGATE, $INJECTOR, $PROVIDE, $ROOT_SCOPE, INJECTOR_KEY
* `import {UpgradeModule} from '@angular/upgrade/static';`
*
* ## Example
* Import the {@link UpgradeModule} into your top level {@link NgModule Angular 2+ `NgModule`}.
* Import the {@link UpgradeModule} into your top level {@link NgModule Angular `NgModule`}.
*
* {@example upgrade/static/ts/module.ts region='ng2-module'}
*
* Then bootstrap the hybrid upgrade app's module, get hold of the {@link UpgradeModule} instance
* and use it to bootstrap the top level [Angular 1
* and use it to bootstrap the top level [AngularJS
* module](https://docs.angularjs.org/api/ng/type/angular.Module).
*
* {@example upgrade/static/ts/module.ts region='bootstrap'}
*
*
* ## Upgrading an Angular 1 service
* ## Upgrading an AngularJS service
*
* There is no specific API for upgrading an Angular 1 service. Instead you should just follow the
* There is no specific API for upgrading an AngularJS service. Instead you should just follow the
* following recipe:
*
* Let's say you have an Angular 1 service:
* Let's say you have an AngularJS service:
*
* {@example upgrade/static/ts/module.ts region="ng1-title-case-service"}
*
* Then you should define an Angular 2+ provider to be included in your {@link NgModule} `providers`
* Then you should define an Angular provider to be included in your {@link NgModule} `providers`
* property.
*
* {@example upgrade/static/ts/module.ts region="upgrade-ng1-service"}
*
* Then you can use the "upgraded" Angular 1 service by injecting it into an Angular 2 component
* Then you can use the "upgraded" AngularJS service by injecting it into an Angular component
* or service.
*
* {@example upgrade/static/ts/module.ts region="use-ng1-upgraded-service"}
*
* @description
*
* This class is an `NgModule`, which you import to provide Angular 1 core services,
* This class is an `NgModule`, which you import to provide AngularJS core services,
* and has an instance method used to bootstrap the hybrid upgrade application.
*
* ## Core Angular 1 services
* ## Core AngularJS services
* Importing this {@link NgModule} will add providers for the core
* [Angular 1 services](https://docs.angularjs.org/api/ng/service) to the root injector.
* [AngularJS services](https://docs.angularjs.org/api/ng/service) to the root injector.
*
* ## Bootstrap
* The runtime instance of this class contains a {@link UpgradeModule#bootstrap `bootstrap()`}
* method, which you use to bootstrap the top level Angular 1 module onto an element in the
* method, which you use to bootstrap the top level AngularJS module onto an element in the
* DOM for the hybrid upgrade app.
*
* It also contains properties to access the {@link UpgradeModule#injector root injector}, the
* bootstrap {@link NgZone} and the
* [Angular 1 $injector](https://docs.angularjs.org/api/auto/service/$injector).
* [AngularJS $injector](https://docs.angularjs.org/api/auto/service/$injector).
*
* @experimental
*/
@NgModule({providers: angular1Providers})
export class UpgradeModule {
/**
* The Angular 1 `$injector` for the upgrade application.
* The AngularJS `$injector` for the upgrade application.
*/
public $injector: any /*angular.IInjectorService*/;
@ -143,10 +143,10 @@ export class UpgradeModule {
public ngZone: NgZone) {}
/**
* Bootstrap an Angular 1 application from this NgModule
* @param element the element on which to bootstrap the Angular 1 application
* @param [modules] the Angular 1 modules to bootstrap for this application
* @param [config] optional extra Angular 1 bootstrap configuration
* Bootstrap an AngularJS application from this NgModule
* @param element the element on which to bootstrap the AngularJS application
* @param [modules] the AngularJS modules to bootstrap for this application
* @param [config] optional extra AngularJS bootstrap configuration
*/
bootstrap(
element: Element, modules: string[] = [], config?: any /*angular.IAngularBootstrapConfig*/) {
@ -219,7 +219,7 @@ export class UpgradeModule {
const windowAngular = (window as any /** TODO #???? */)['angular'];
windowAngular.resumeBootstrap = undefined;
// Bootstrap the angular 1 application inside our zone
// Bootstrap the AngularJS application inside our zone
this.ngZone.run(() => { angular.bootstrap(element, [upgradeModule.name], config); });
// Patch resumeBootstrap() to run inside the ngZone

View File

@ -20,12 +20,12 @@ import {Deferred, controllerKey, getAttributesAsArray, onError} from './util';
let upgradeCount: number = 0;
/**
* Use `UpgradeAdapter` to allow Angular 1 and Angular 2+ to coexist in a single application.
* Use `UpgradeAdapter` to allow AngularJS and Angular to coexist in a single application.
*
* The `UpgradeAdapter` allows:
* 1. creation of Angular 2+ component from Angular 1 component directive
* 1. creation of Angular component from AngularJS component directive
* (See [UpgradeAdapter#upgradeNg1Component()])
* 2. creation of Angular 1 directive from Angular 2+ component.
* 2. creation of AngularJS directive from Angular component.
* (See [UpgradeAdapter#downgradeNg2Component()])
* 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks
* coexisting in a single application.
@ -40,20 +40,20 @@ let upgradeCount: number = 0;
* 2. Each DOM element on the page is owned exactly by one framework. Whichever framework
* instantiated the element is the owner. Each framework only updates/interacts with its own
* DOM elements and ignores others.
* 3. Angular 1 directives always execute inside Angular 1 framework codebase regardless of
* 3. AngularJS directives always execute inside AngularJS framework codebase regardless of
* where they are instantiated.
* 4. Angular 2+ components always execute inside Angular 2+ framework codebase regardless of
* 4. Angular components always execute inside Angular framework codebase regardless of
* where they are instantiated.
* 5. An Angular 1 component can be upgraded to an Angular 2+ component. This creates an
* Angular 2+ directive, which bootstraps the Angular 1 component directive in that location.
* 6. An Angular 2+ component can be downgraded to an Angular 1 component directive. This creates
* an Angular 1 directive, which bootstraps the Angular 2+ component in that location.
* 5. An AngularJS component can be upgraded to an Angular component. This creates an
* Angular directive, which bootstraps the AngularJS component directive in that location.
* 6. An Angular component can be downgraded to an AngularJS component directive. This creates
* an AngularJS directive, which bootstraps the Angular component in that location.
* 7. Whenever an adapter component is instantiated the host element is owned by the framework
* doing the instantiation. The other framework then instantiates and owns the view for that
* component. This implies that component bindings will always follow the semantics of the
* instantiation framework. The syntax is always that of Angular 2+ syntax.
* 8. Angular 1 is always bootstrapped first and owns the bottom most view.
* 9. The new application is running in Angular 2+ zone, and therefore it no longer needs calls to
* instantiation framework. The syntax is always that of Angular syntax.
* 8. AngularJS is always bootstrapped first and owns the bottom most view.
* 9. The new application is running in Angular zone, and therefore it no longer needs calls to
* `$apply()`.
*
* ### Example
@ -119,24 +119,24 @@ export class UpgradeAdapter {
constructor(private ng2AppModule: Type<any>, private compilerOptions?: CompilerOptions) {
if (!ng2AppModule) {
throw new Error(
'UpgradeAdapter cannot be instantiated without an NgModule of the Angular 2 app.');
'UpgradeAdapter cannot be instantiated without an NgModule of the Angular app.');
}
}
/**
* Allows Angular 2+ Component to be used from Angular 1.
* Allows Angular Component to be used from AngularJS.
*
* Use `downgradeNg2Component` to create an Angular 1 Directive Definition Factory from
* Angular 2+ Component. The adapter will bootstrap Angular 2+ component from within the
* Angular 1 template.
* Use `downgradeNg2Component` to create an AngularJS Directive Definition Factory from
* Angular Component. The adapter will bootstrap Angular component from within the
* AngularJS template.
*
* ## Mental Model
*
* 1. The component is instantiated by being listed in Angular 1 template. This means that the
* host element is controlled by Angular 1, but the component's view will be controlled by
* Angular 2+.
* 2. Even thought the component is instantiated in Angular 1, it will be using Angular 2+
* syntax. This has to be done, this way because we must follow Angular 2+ components do not
* 1. The component is instantiated by being listed in AngularJS template. This means that the
* host element is controlled by AngularJS, but the component's view will be controlled by
* Angular.
* 2. Even thought the component is instantiated in AngularJS, it will be using Angular
* syntax. This has to be done, this way because we must follow Angular components do not
* declare how the attributes should be interpreted.
* 3. ng-model is controlled by AngularJS v1 and communicates with the downgraded Ng2 component
* by way of the ControlValueAccessor interface from @angular/forms. Only components that
@ -189,17 +189,17 @@ export class UpgradeAdapter {
}
/**
* Allows Angular 1 Component to be used from Angular 2+.
* Allows AngularJS Component to be used from Angular.
*
* Use `upgradeNg1Component` to create an Angular 2+ component from Angular 1 Component
* directive. The adapter will bootstrap Angular 1 component from within the Angular 2+
* Use `upgradeNg1Component` to create an Angular component from AngularJS Component
* directive. The adapter will bootstrap AngularJS component from within the Angular
* template.
*
* ## Mental Model
*
* 1. The component is instantiated by being listed in Angular 2+ template. This means that the
* host element is controlled by Angular 2+, but the component's view will be controlled by
* Angular 1.
* 1. The component is instantiated by being listed in Angular template. This means that the
* host element is controlled by Angular, but the component's view will be controlled by
* AngularJS.
*
* ## Supported Features
*
@ -212,7 +212,7 @@ export class UpgradeAdapter {
* - Only some of the features of
* [Directive Definition Object](https://docs.angularjs.org/api/ng/service/$compile) are
* supported:
* - `compile`: not supported because the host element is owned by Angular 2+, which does
* - `compile`: not supported because the host element is owned by Angular, which does
* not allow modifying DOM structure during compilation.
* - `controller`: supported. (NOTE: injection of `$attrs` and `$transclude` is not supported.)
* - `controllerAs`: supported.
@ -275,9 +275,9 @@ export class UpgradeAdapter {
}
/**
* Registers the adapter's Angular 1 upgrade module for unit testing in Angular 1.
* Registers the adapter's AngularJS upgrade module for unit testing in AngularJS.
* Use this instead of `angular.mock.module()` to load the upgrade module into
* the Angular 1 testing injector.
* the AngularJS testing injector.
*
* ### Example
*
@ -311,9 +311,9 @@ export class UpgradeAdapter {
*
* ```
*
* @param modules any Angular 1 modules that the upgrade module should depend upon
* @param modules any AngularJS modules that the upgrade module should depend upon
* @returns an {@link UpgradeAdapterRef}, which lets you register a `ready()` callback to
* run assertions once the Angular 2+ components are ready to test through Angular 1.
* run assertions once the Angular components are ready to test through AngularJS.
*/
registerForNg1Tests(modules?: string[]): UpgradeAdapterRef {
const windowNgMock = (window as any)['angular'].mock;
@ -329,11 +329,11 @@ export class UpgradeAdapter {
}
/**
* Bootstrap a hybrid Angular 1 / Angular 2+ application.
* Bootstrap a hybrid AngularJS / Angular application.
*
* This `bootstrap` method is a direct replacement (takes same arguments) for Angular 1
* This `bootstrap` method is a direct replacement (takes same arguments) for AngularJS
* [`bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) method. Unlike
* Angular 1, this bootstrap is asynchronous.
* AngularJS, this bootstrap is asynchronous.
*
* ### Example
*
@ -405,7 +405,7 @@ export class UpgradeAdapter {
}
/**
* Allows Angular 1 service to be accessible from Angular 2+.
* Allows AngularJS service to be accessible from Angular.
*
*
* ### Example
@ -445,7 +445,7 @@ export class UpgradeAdapter {
}
/**
* Allows Angular 2+ service to be accessible from Angular 1.
* Allows Angular service to be accessible from AngularJS.
*
*
* ### Example
@ -473,13 +473,13 @@ export class UpgradeAdapter {
/**
* Declare the Angular 1 upgrade module for this adapter without bootstrapping the whole
* Declare the AngularJS upgrade module for this adapter without bootstrapping the whole
* hybrid application.
*
* This method is automatically called by `bootstrap()` and `registerForNg1Tests()`.
*
* @param modules The Angular 1 modules that this upgrade module should depend upon.
* @returns The Angular 1 upgrade module that is declared by this method
* @param modules The AngularJS modules that this upgrade module should depend upon.
* @returns The AngularJS upgrade module that is declared by this method
*
* ### Example
*
@ -511,7 +511,7 @@ export class UpgradeAdapter {
'$delegate',
function(rootScopeDelegate: angular.IRootScopeService) {
// Capture the root apply so that we can delay first call to $apply until we
// bootstrap Angular 2 and then we replay and restore the $apply.
// bootstrap Angular and then we replay and restore the $apply.
rootScopePrototype = rootScopeDelegate.constructor.prototype;
if (rootScopePrototype.hasOwnProperty('$apply')) {
original$applyFn = rootScopePrototype.$apply;
@ -612,7 +612,7 @@ interface ComponentFactoryRefMap {
/**
* Synchronous promise-like object to wrap parent injectors,
* to preserve the synchronous nature of Angular 1's $compile.
* to preserve the synchronous nature of AngularJS's $compile.
*/
class ParentInjectorPromise {
private injector: Injector;
@ -730,7 +730,7 @@ function ng1ComponentDirective(info: ComponentInfo, idPrefix: string): Function
}
/**
* Use `UpgradeAdapterRef` to control a hybrid Angular 1 / Angular 2+ application.
* Use `UpgradeAdapterRef` to control a hybrid AngularJS / Angular application.
*
* @stable
*/
@ -753,16 +753,16 @@ export class UpgradeAdapterRef {
}
/**
* Register a callback function which is notified upon successful hybrid Angular 1 / Angular 2+
* Register a callback function which is notified upon successful hybrid AngularJS / Angular
* application has been bootstrapped.
*
* The `ready` callback function is invoked inside the Angular 2+ zone, therefore it does not
* The `ready` callback function is invoked inside the Angular zone, therefore it does not
* require a call to `$apply()`.
*/
public ready(fn: (upgradeAdapterRef?: UpgradeAdapterRef) => void) { this._readyFn = fn; }
/**
* Dispose of running hybrid Angular 1 / Angular 2+ application.
* Dispose of running hybrid AngularJS / Angular application.
*/
public dispose() {
this.ng1Injector.get(NG1_ROOT_SCOPE).$destroy();

View File

@ -182,7 +182,7 @@ export class UpgradeNg1ComponentAdapterBuilder {
}
/**
* Upgrade ng1 components into Angular 2.
* Upgrade ng1 components into Angular.
*/
static resolve(
exportedComponents: {[name: string]: UpgradeNg1ComponentAdapterBuilder},

View File

@ -11,7 +11,7 @@ import {downgradeInjectable} from '@angular/upgrade/src/aot/downgrade_injectable
export function main() {
describe('downgradeInjectable', () => {
it('should return an Angular 1 annotated factory for the token', () => {
it('should return an AngularJS annotated factory for the token', () => {
const factory = downgradeInjectable('someToken');
expect(factory[0]).toEqual(INJECTOR_KEY);
expect(factory[1]).toEqual(jasmine.any(Function));

View File

@ -21,11 +21,11 @@ export function main() {
beforeEach(() => destroyPlatform());
afterEach(() => destroyPlatform());
it('should have angular 1 loaded', () => expect(angular.version.major).toBe(1));
it('should have AngularJS loaded', () => expect(angular.version.major).toBe(1));
it('should verify UpgradeAdapter example', async(() => {
// This is wrapping (upgrading) an Angular 1 component to be used in an Angular 2
// This is wrapping (upgrading) an AngularJS component to be used in an Angular
// component
@Directive({selector: 'ng1'})
class Ng1Component extends UpgradeComponent {
@ -36,7 +36,7 @@ export function main() {
}
}
// This is an Angular 2 component that will be downgraded
// This is an Angular component that will be downgraded
@Component({
selector: 'ng2',
template: 'ng2[<ng1 [title]="nameProp">transclude</ng1>](<ng-content></ng-content>)'
@ -45,7 +45,7 @@ export function main() {
@Input('name') nameProp: string;
}
// This module represents the Angular 2 pieces of the application
// This module represents the Angular pieces of the application
@NgModule({
declarations: [Ng1Component, Ng2Component],
entryComponents: [Ng2Component],
@ -56,11 +56,11 @@ export function main() {
}
}
// This module represents the Angular 1 pieces of the application
// This module represents the AngularJS pieces of the application
const ng1Module =
angular
.module('myExample', [])
// This is an Angular 1 component that will be upgraded
// This is an AngularJS component that will be upgraded
.directive(
'ng1',
() => {
@ -70,13 +70,13 @@ export function main() {
template: 'ng1[Hello {{title}}!](<span ng-transclude></span>)'
};
})
// This is wrapping (downgrading) an Angular 2 component to be used in Angular 1
// This is wrapping (downgrading) an Angular component to be used in AngularJS
.directive(
'ng2',
downgradeComponent({component: Ng2Component, inputs: ['nameProp: name']}));
// This is the (Angular 1) application bootstrap element
// Notice that it is actually a downgraded Angular 2 component
// This is the (AngularJS) application bootstrap element
// Notice that it is actually a downgraded Angular component
const element = html('<ng2 name="World">project</ng2>');
// Let's use a helper function to make this simpler

View File

@ -56,7 +56,7 @@ export function main() {
@NgModule({
imports: [BrowserModule, UpgradeModule],
providers: [
// the following line is the "upgrade" of an Angular 1 service
// the following line is the "upgrade" of an AngularJS service
{
provide: Ng1Service,
useFactory: (i: angular.IInjectorService) => i.get('ng1Service'),

View File

@ -12,8 +12,8 @@ import {UpgradeModule} from '@angular/upgrade/static';
export function bootstrap(
platform: PlatformRef, Ng2Module: Type<{}>, element: Element, ng1Module: angular.IModule) {
// We bootstrap the Angular 2 module first; then when it is ready (async)
// We bootstrap the Angular 1 module on the bootstrap element
// We bootstrap the Angular module first; then when it is ready (async)
// We bootstrap the AngularJS module on the bootstrap element
return platform.bootstrapModule(Ng2Module).then(ref => {
const upgrade = ref.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(element, [ng1Module.name]);

View File

@ -19,7 +19,7 @@ export function main() {
afterEach(() => destroyPlatform());
describe('(basic use)', () => {
it('should have angular 1 loaded', () => expect(angular.version.major).toBe(1));
it('should have AngularJS loaded', () => expect(angular.version.major).toBe(1));
it('should instantiate ng2 in ng1 template and project content', async(() => {
const ng1Module = angular.module('ng1', []);

View File

@ -10,7 +10,7 @@
var browserProvidersConf = require('../../browser-providers.conf.js');
// This runs the tests for the router in Angular 1.x
// This runs the tests for the router in AngularJS
module.exports = function (config) {
var options = {

View File

@ -8,7 +8,7 @@
angular.module('ngComponentRouter').
value('$route', null). // can be overloaded with ngRouteShim
// Because Angular 1 has no notion of a root component, we use an object with unique identity
// Because AngularJS has no notion of a root component, we use an object with unique identity
// to represent this. Can be overloaded with a component name
value('$routerRootComponent', new Object()).

View File

@ -266,7 +266,7 @@ function dashCase(str: string): string {
}
/*
* A module for adding new a routing system Angular 1.
* A module for adding new a routing system AngularJS.
*/
angular.module('ngComponentRouter', [])
.directive('ngOutlet', ['$animate', '$q', '$rootRouter', ngOutletDirective])

View File

@ -1,5 +1,5 @@
/**
* This file is generated by the Angular 2 template compiler.
* This file is generated by the Angular template compiler.
* Do not edit.
*/
/* tslint:disable */

View File

@ -1,6 +1,6 @@
/**
* This file is hand tweeked based on
* the out put of the Angular 2 template compiler
* the out put of the Angular template compiler
* and then hand tweeked to show possible future output.
*/
/* tslint:disable */

View File

@ -1,5 +1,5 @@
/**
* This file is generated by the Angular 2 template compiler.
* This file is generated by the Angular template compiler.
* Do not edit.
*/
/* tslint:disable */

View File

@ -1,6 +1,6 @@
# Ng2 Next Benchmark
This benchmark uses the upcoming view engine for Angular 2, which moves
This benchmark uses the upcoming view engine for Angular, which moves
more functionality from codegen into runtime to reduce generated code size.
As we introduce more runtime code, we need to be very careful to not

View File

@ -1,5 +1,5 @@
/**
* This file is generated by the Angular 2 template compiler.
* This file is generated by the Angular template compiler.
* Do not edit.
*/
/* tslint:disable */

View File

@ -1,6 +1,6 @@
/**
* This file is hand tweeked based on
* the out put of the Angular 2 template compiler
* the out put of the Angular template compiler
* and then hand tweeked to show possible future output.
*/
/* tslint:disable */

View File

@ -1,6 +1,6 @@
/**
* This file is hand tweeked based on
* the out put of the Angular 2 template compiler
* the out put of the Angular template compiler
* and then hand tweeked to show possible future output.
*/
/* tslint:disable */

View File

@ -1,5 +1,5 @@
/**
* This file is generated by the Angular 2 template compiler.
* This file is generated by the Angular template compiler.
* Do not edit.
*/
/* tslint:disable */

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Angular 2.0 Hello World payload test</title>
<title>Angular Hello World payload test</title>
<body>
<hello-app>
Loading...

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Angular 2.0 Hello World payload test</title>
<title>Angular Hello World payload test</title>
<body>
<hello-app>
Loading...

View File

@ -26,7 +26,7 @@ xdescribe('ngUpgrade', function() {
verifyNoBrowserErrors();
});
it('should bootstrap Angular 1 and Angular 2 apps together', function() {
it('should bootstrap AngularJS and Angular apps together', function() {
const ng1NameInput = element(by.css('input[ng-model="name"]'));
expect(ng1NameInput.getAttribute('value')).toEqual('World');

View File

@ -19,7 +19,7 @@ describe('WebWorkers Animations', function() {
const URL = 'all/playground/src/web_workers/animations/index.html';
it('should bootstrap', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
@ -29,7 +29,7 @@ describe('WebWorkers Animations', function() {
});
it('should animate to open', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);

View File

@ -20,7 +20,7 @@ describe('WebWorkers Input', function() {
const VALUE = 'test val';
it('should bootstrap', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
@ -30,7 +30,7 @@ describe('WebWorkers Input', function() {
});
it('should bind to input value', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
@ -44,7 +44,7 @@ describe('WebWorkers Input', function() {
});
it('should bind to textarea value', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);

View File

@ -18,7 +18,7 @@ describe('WebWorkers Kitchen Sink', function() {
const URL = 'all/playground/src/web_workers/kitchen_sink/index.html';
it('should greet', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
@ -30,7 +30,7 @@ describe('WebWorkers Kitchen Sink', function() {
});
it('should change greeting', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
const changeButtonSelector = 'hello-app .changeButton';
@ -43,7 +43,7 @@ describe('WebWorkers Kitchen Sink', function() {
});
it('should display correct key names', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
browser.wait(protractor.until.elementLocated(by.css('.sample-area')), 15000);

View File

@ -19,7 +19,7 @@ describe('MessageBroker', function() {
});
it('should bootstrap', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
waitForBootstrap();
@ -28,7 +28,7 @@ describe('MessageBroker', function() {
it('should echo messages', () => {
const VALUE = 'Hi There';
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
waitForBootstrap();

View File

@ -11,7 +11,7 @@ import {browser, by, element, protractor} from 'protractor';
describe('WebWorker Router', () => {
beforeEach(() => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get('/');
});

View File

@ -18,7 +18,7 @@ describe('WebWorkers Todo', function() {
const URL = 'all/playground/src/web_workers/todo/index.html';
it('should bootstrap', () => {
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Hello Angular 2.0</title>
<title>Hello Angular</title>
<body>
<hello-app>
Loading...

View File

@ -31,8 +31,8 @@ export class RedDec {
}
}
// Angular 2.0 supports 2 basic types of directives:
// - Component - the basic building blocks of Angular 2.0 apps. Backed by
// Angular supports 2 basic types of directives:
// - Component - the basic building blocks of Angular apps. Backed by
// ShadowDom.(http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/)
// - Directive - add behavior to existing elements.

View File

@ -12,7 +12,7 @@ import {BrowserModule} from '@angular/platform-browser';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
/**
* You can find the Angular 1 implementation of this example here:
* You can find the AngularJS implementation of this example here:
* https://github.com/wardbell/ng1DataBinding
*/

View File

@ -12,7 +12,7 @@ import {BrowserModule} from '@angular/platform-browser';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
/**
* You can find the Angular 1 implementation of this example here:
* You can find the AngularJS implementation of this example here:
* https://github.com/wardbell/ng1DataBinding
*/

View File

@ -1,6 +1,6 @@
<!doctype html>
<base>
<title>Todo Angular 2</title>
<title>Todo Angular</title>
<link rel="stylesheet" href="css/main.css" media="screen" title="no title" charset="utf-8">
<base href="./">
<body>

View File

@ -1,7 +1,7 @@
<nav class="blue">
<div class="container">
<div class="nav-wrapper">
<a class="brand-logo">Angular 2 Image Demo</a>
<a class="brand-logo">Angular Image Demo</a>
</div>
</div>
</nav>

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Hello Angular 2.0</title>
<title>Hello Angular</title>
<style>
.sample-area {
text-align: center;

View File

@ -25,8 +25,8 @@ export class RedDec {
}
}
// Angular 2.0 supports 2 basic types of directives:
// - Component - the basic building blocks of Angular 2.0 apps. Backed by
// Angular supports 2 basic types of directives:
// - Component - the basic building blocks of Angular apps. Backed by
// ShadowDom.(http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/)
// - Directive - add behavior to existing elements.

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Todo Angular 2 - WebWorker</title>
<title>Todo Angular - WebWorker</title>
<link rel="stylesheet" href="css/main.css" media="screen" title="no title" charset="utf-8">
<body>
<todo-app>

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Todo Angular 2 - WebWorker</title>
<title>Todo Angular - WebWorker</title>
<link rel="stylesheet" href="css/main.css" media="screen" title="no title" charset="utf-8">
<body>
<todo-app>

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<title>Zippy Angular 2.0</title>
<title>Zippy Angular</title>
<body>
<zippy-app>
Loading...

View File

@ -27,7 +27,6 @@
},
"exclude": [
"angular1_router",
"angular2",
"benchmarks/e2e_test/old",
"benchmarks/src/old",
"benchmarks/src/**/index_aot.ts",

View File

@ -3,7 +3,7 @@
"version": "4.0.0-beta.5",
"private": true,
"branchPattern": "2.0.*",
"description": "Angular 2 - a web framework for modern web apps",
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
"bugs": "https://github.com/angular/angular/issues",
"license": "MIT",

View File

@ -16,7 +16,7 @@ supports specific extensions developed by the Angular team:
## TypeScript Decorator metadata collector
The `.d.ts` format does not preserve information about the Decorators applied to symbols.
Some tools, such as Angular 2 template compiler, need access to statically analyzable
Some tools, such as Angular template compiler, need access to statically analyzable
information about Decorators, so this library allows programs to produce a `foo.metadata.json`
to accompany a `foo.d.ts` file, and preserves the information that was lost in the declaration
emit.

View File

@ -24,7 +24,7 @@ var issues = [];
// coarse Node version check
if (+process.version[1] < 5) {
issues.push('Angular 2 build currently requires Node 5+. Use nvm to update your node version.');
issues.push('Angular build currently requires Node 5+. Use nvm to update your node version.');
}
try {