Skip to content

Compare changes across branches, commits, tags, and more below. #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ groups:
- >
contains_any_globs(files, [
'packages/core/src/i18n/**',
'packages/core/src/render3/i18n.ts',
'packages/core/src/render3/i18n.md',
'packages/core/src/render3/i18n/**',
'packages/core/src/render3/instructions/i18n.ts',
'packages/core/src/render3/interfaces/i18n.ts',
'packages/common/locales/**',
'packages/common/src/i18n/**',
Expand Down
5 changes: 2 additions & 3 deletions aio/content/guide/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

In a single-page app, you change what the user sees by showing or hiding portions of the display that correspond to particular components, rather than going out to the server to get a new page.
As users perform application tasks, they need to move between the different [views](guide/glossary#view "Definition of view") that you have defined.
To implement this kind of navigation within the single page of your app, you use the Angular **`Router`**.

To handle the navigation from one [view](guide/glossary#view) to the next, you use the Angular _router_.
The router enables navigation by interpreting a browser URL as an instruction to change the view.
To handle the navigation from one [view](guide/glossary#view) to the next, you use the Angular **`Router`**.
The **`Router`** enables navigation by interpreting a browser URL as an instruction to change the view.

To explore a sample app featuring the router's primary features, see the <live-example></live-example>.

Expand Down
38 changes: 0 additions & 38 deletions aio/content/marketing/contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@
"groups": ["Angular"],
"lead": "kara"
},
"matsko": {
"name": "Matias Niemela",
"picture": "matias.jpg",
"twitter": "yearofmoo",
"website": "http://yearofmoo.com",
"bio": "Matias Niemela is a fullstack web developer who has been programming & building websites for over 10 years, and a core team member of AngularJS for two years. In the spring of 2015 Matias joined Angular full time at Google. In his free time Matias loves to build complex things and is always up for public speaking, travelling and tweaking his current Vim setup.",
"groups": ["Angular"],
"lead": "kara"
},
"kara": {
"name": "Kara Erickson",
"picture": "kara-erickson.jpg",
"twitter": "karaforthewin",
"website": "https://github.com/kara",
"bio": "Kara is a software engineer on the Angular team at Google and a co-organizer of the Angular-SF Meetup. Prior to Google, she helped build UI components in Angular for guest management systems at OpenTable. She enjoys snacking indiscriminately and probably other things too.",
"groups": ["Angular"],
"lead": "igorminar"
},
"pkozlowski-opensource": {
"name": "Pawel Kozlowski",
"picture": "pawel.jpg",
Expand Down Expand Up @@ -618,26 +600,6 @@
"bio": "Justin (aka Schwarty) is a Google Developer Expert in Web Technologies and Angular, the host and maintainer of the weekly AngularAir live video broadcast, educator, writer and content creator. He has Angular courses available on LinkedIn Learning and Pluralsight and loves passing on years of full stack development knowledge to help empower others to find their inner awesomeness!",
"groups": ["GDE"]
},
"dennispbrown": {
"name": "Denny Brown",
"picture": "denny.jpg",
"bio": "Denny is founder of Expert Support, a professional services firm specializing in technical communication, and leads the Angular technical writing team. His lifelong passion has been to reduce the time and effort required to understand complex technical information. Early on, he was Associate Chairman of the Computer Science Department at Stanford, where he taught introductory courses in programming. He also plays old-timers baseball in local leagues and national tournaments.",
"groups": ["Angular"],
"lead": "aikidave"
},
"jbogarthyde": {
"name": "Judy Bogart",
"picture": "judy.png",
"groups": ["Angular"],
"lead": "dennispbrown"
},
"rockument69": {
"name": "Tony Bove",
"picture": "rockument69.jpg",
"bio": "Tony is a technical writer with Expert Support. His lifelong passions are helping people use technology, writing fiction, and playing music. When he's not working or playing the harmonica with friends in a bluegrass band, he's swimming and snorkeling on a Kauai beach and playing ball with his Irish Wolfhound. He's worked at home for decades before it became a thing.",
"groups": ["Angular"],
"lead": "aikidave"
},
"kapunahelewong": {
"name": "Kapunahele Wong",
"picture": "kapunahele.jpg",
Expand Down
5 changes: 3 additions & 2 deletions goldens/circular-deps/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1758,9 +1758,10 @@
"packages/core/src/render3/index.ts"
],
[
"packages/core/src/render3/i18n.ts",
"packages/core/src/render3/i18n/i18n_apply.ts",
"packages/core/src/render3/interfaces/type_checks.ts",
"packages/core/src/render3/index.ts"
"packages/core/src/render3/index.ts",
"packages/core/src/render3/instructions/i18n.ts"
],
[
"packages/core/src/render3/interfaces/container.ts",
Expand Down
2 changes: 1 addition & 1 deletion goldens/size-tracking/integration-payloads.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"bundle": "TODO(i): we should define ngDevMode to false in Closure, but --define only works in the global scope.",
"bundle": "TODO(i): (FW-2164) TS 3.9 new class shape seems to have broken Closure in big ways. The size went from 169991 to 252338",
"bundle": "TODO(i): after removal of tsickle from ngc-wrapped / ng_package, we had to switch to SIMPLE optimizations which increased the size from 252338 to 1198917, see PR#37221 and PR#37317 for more info",
"bundle": 1213130
"bundle": 1214317
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/compiler-cli/src/ngtsc/annotations/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export function generateSetClassMetadataCall(
`Duplicate decorated properties found on class '${clazz.name.text}': ` +
duplicateDecoratedMemberNames.join(', '));
}
const decoratedMembers =
classMembers.map(member => classMemberToMetadata(member.name, member.decorators!, isCore));
const decoratedMembers = classMembers.map(
member => classMemberToMetadata(member.nameNode ?? member.name, member.decorators!, isCore));
if (decoratedMembers.length > 0) {
metaPropDecorators = ts.createObjectLiteral(decoratedMembers);
}
Expand Down Expand Up @@ -127,7 +127,7 @@ function ctorParameterToMetadata(
* Convert a reflected class member to metadata.
*/
function classMemberToMetadata(
name: string, decorators: Decorator[], isCore: boolean): ts.PropertyAssignment {
name: ts.PropertyName|string, decorators: Decorator[], isCore: boolean): ts.PropertyAssignment {
const ngDecorators = decorators.filter(dec => isAngularDecorator(dec, isCore))
.map((decorator: Decorator) => decoratorToMetadata(decorator));
const decoratorMeta = ts.createArrayLiteral(ngDecorators);
Expand Down
13 changes: 13 additions & 0 deletions packages/compiler-cli/src/ngtsc/annotations/test/metadata_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ runInEachFileSystem(() => {
`);
expect(res).toBe('');
});

it('should preserve quotes around class member names', () => {
const res = compileAndPrint(`
import {Component, Input} from '@angular/core';

@Component('metadata') class Target {
@Input() 'has-dashes-in-name' = 123;
@Input() noDashesInName = 456;
}
`);
expect(res).toContain(
`{ 'has-dashes-in-name': [{ type: Input }], noDashesInName: [{ type: Input }] })`);
});
});

function compileAndPrint(contents: string): string {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/application_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {ComponentFactoryResolver} from './linker';
import {Compiler} from './linker/compiler';
import {NgModule} from './metadata';
import {SCHEDULER} from './render3/component_ref';
import {setLocaleId} from './render3/i18n';
import {setLocaleId} from './render3/i18n/i18n_locale_id';
import {NgZone} from './zone';

declare const $localize: {locale?: string};
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/application_ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {InternalViewRef, ViewRef} from './linker/view_ref';
import {isComponentResourceResolutionQueueEmpty, resolveComponentResources} from './metadata/resource_loading';
import {assertNgModuleType} from './render3/assert';
import {ComponentFactory as R3ComponentFactory} from './render3/component_ref';
import {setLocaleId} from './render3/i18n';
import {setLocaleId} from './render3/i18n/i18n_locale_id';
import {setJitOptions} from './render3/jit/jit_options';
import {NgModuleFactory as R3NgModuleFactory} from './render3/ng_module_ref';
import {publishDefaultGlobalUtils as _publishDefaultGlobalUtils} from './render3/util/global_utils';
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/render3/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import {devModeEqual} from '../change_detection/change_detection_util';
import {assertDataInRange, assertLessThan, assertNotSame} from '../util/assert';
import {assertIndexInRange, assertLessThan, assertNotSame} from '../util/assert';

import {getExpressionChangedErrorDetails, throwErrorIfNoChangesMode} from './errors';
import {LView} from './interfaces/view';
Expand All @@ -24,7 +24,7 @@ export function updateBinding(lView: LView, bindingIndex: number, value: any): a

/** Gets the current binding value. */
export function getBinding(lView: LView, bindingIndex: number): any {
ngDevMode && assertDataInRange(lView, bindingIndex);
ngDevMode && assertIndexInRange(lView, bindingIndex);
ngDevMode &&
assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');
return lView[bindingIndex];
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/render3/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import {Type} from '../core';
import {Injector} from '../di/injector';
import {Sanitizer} from '../sanitization/sanitizer';
import {assertDataInRange} from '../util/assert';
import {assertIndexInRange} from '../util/assert';

import {assertComponentType} from './assert';
import {getComponentDef} from './definition';
Expand Down Expand Up @@ -172,7 +172,7 @@ export function createRootComponentView(
rNode: RElement|null, def: ComponentDef<any>, rootView: LView,
rendererFactory: RendererFactory3, hostRenderer: Renderer3, sanitizer?: Sanitizer|null): LView {
const tView = rootView[TVIEW];
ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);
ngDevMode && assertIndexInRange(rootView, 0 + HEADER_OFFSET);
rootView[0 + HEADER_OFFSET] = rNode;
const tNode: TElementNode = getOrCreateTNode(tView, null, 0, TNodeType.Element, null, null);
const mergedAttrs = tNode.mergedAttrs = def.hostAttrs;
Expand Down
7 changes: 4 additions & 3 deletions packages/core/src/render3/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ function searchTokensOnInjector<T>(
* @returns Index of a found directive or provider, or null when none found.
*/
export function locateDirectiveOrProvider<T>(
tNode: TNode, tView: TView, token: Type<T>|InjectionToken<T>, canAccessViewProviders: boolean,
isHostSpecialCase: boolean|number): number|null {
tNode: TNode, tView: TView, token: Type<T>|InjectionToken<T>|string,
canAccessViewProviders: boolean, isHostSpecialCase: boolean|number): number|null {
const nodeProviderIndexes = tNode.providerIndexes;
const tInjectables = tView.data;

Expand All @@ -510,7 +510,8 @@ export function locateDirectiveOrProvider<T>(
// When the host special case applies, only the viewProviders and the component are visible
const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;
for (let i = startingIndex; i < endIndex; i++) {
const providerTokenOrDef = tInjectables[i] as InjectionToken<any>| Type<any>| DirectiveDef<any>;
const providerTokenOrDef =
tInjectables[i] as InjectionToken<any>| Type<any>| DirectiveDef<any>| string;
if (i < directivesStart && token === providerTokenOrDef ||
i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token) {
return i;
Expand Down
Loading