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

@ -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', []);