diff --git a/modules/@angular/compiler/src/compile_metadata.ts b/modules/@angular/compiler/src/compile_metadata.ts index 57ddb1b1e6..6a90cf3c3b 100644 --- a/modules/@angular/compiler/src/compile_metadata.ts +++ b/modules/@angular/compiler/src/compile_metadata.ts @@ -442,8 +442,6 @@ export class CompileDirectiveMetadata implements CompileMetadataWithIdentifier { hostProperties[matches[1]] = value; } else if (isPresent(matches[2])) { hostListeners[matches[2]] = value; - } else if (isPresent(matches[3])) { // DEPRECATED: remove this if statement post RC5 - hostProperties['@' + matches[3]] = value; } }); } diff --git a/modules/@angular/compiler/src/expression_parser/lexer.ts b/modules/@angular/compiler/src/expression_parser/lexer.ts index bc294b27d0..5f56f482b7 100644 --- a/modules/@angular/compiler/src/expression_parser/lexer.ts +++ b/modules/@angular/compiler/src/expression_parser/lexer.ts @@ -57,10 +57,6 @@ export class Token { isKeyword(): boolean { return this.type == TokenType.Keyword; } - isKeywordDeprecatedVar(): boolean { - return this.type == TokenType.Keyword && this.strValue == 'var'; - } - isKeywordLet(): boolean { return this.type == TokenType.Keyword && this.strValue == 'let'; } isKeywordNull(): boolean { return this.type == TokenType.Keyword && this.strValue == 'null'; } @@ -392,4 +388,4 @@ function unescape(code: number): number { default: return code; } -} \ No newline at end of file +} diff --git a/modules/@angular/compiler/src/template_parser/template_parser.ts b/modules/@angular/compiler/src/template_parser/template_parser.ts index bb30c71dd9..30e1cf06f7 100644 --- a/modules/@angular/compiler/src/template_parser/template_parser.ts +++ b/modules/@angular/compiler/src/template_parser/template_parser.ts @@ -821,12 +821,6 @@ class TemplateParseVisitor implements html.Visitor { boundPropertyName = partValue.substr(1); bindingType = PropertyBindingType.Animation; securityContext = SecurityContext.NONE; - if (boundPropertyName[0] == '@') { - this._reportError( - `Assigning animation triggers within host data as attributes such as "@prop": "exp" is invalid. Use host bindings (e.g. "[@prop]": "exp") instead.`, - sourceSpan, ParseErrorLevel.FATAL); - boundPropertyName = boundPropertyName.substr(1); - } } else { boundPropertyName = this._schemaRegistry.getMappedPropName(partValue); securityContext = this._schemaRegistry.securityContext(elementName, boundPropertyName); diff --git a/modules/@angular/compiler/test/template_parser/template_parser_spec.ts b/modules/@angular/compiler/test/template_parser/template_parser_spec.ts index cf8679bc29..604af8fe2c 100644 --- a/modules/@angular/compiler/test/template_parser/template_parser_spec.ts +++ b/modules/@angular/compiler/test/template_parser/template_parser_spec.ts @@ -301,21 +301,6 @@ Can't bind to 'invalidProp' since it isn't a known property of 'my-component'. /Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings \(e.g. \[@prop\]="exp"\) or use an attribute without a value \(e.g. @prop\) instead. \("
\]@something="value2">"\): TestComp@0:5/); }); - it('should throw an error when host attributes contain a non property-bound animation trigger', - () => { - expect(() => { - var dirA = CompileDirectiveMetadata.create({ - selector: 'div', - type: new CompileTypeMetadata({moduleUrl: someModuleUrl, name: 'DirA'}), - host: {'@prop': 'expr'} - }); - - humanizeTplAst(parse('
', [dirA])); - }) - .toThrowError( - /Assigning animation triggers within host data as attributes such as "@prop": "exp" is invalid. Use host bindings \(e.g. "\[@prop\]": "exp"\) instead. \("\[ERROR ->\]
<\/div>"\): TestComp@0:0, Directive DirA/); - }); - it('should not issue a warning when host attributes contain a valid property-bound animation trigger', () => { var dirA = CompileDirectiveMetadata.create({ diff --git a/modules/@angular/core/testing/testing_internal.ts b/modules/@angular/core/testing/testing_internal.ts index e64593e65f..87d55477bc 100644 --- a/modules/@angular/core/testing/testing_internal.ts +++ b/modules/@angular/core/testing/testing_internal.ts @@ -112,24 +112,6 @@ export function beforeEachProviders(fn: Function): void { }); } -/** - * Allows overriding default providers of the test injector, - * which are defined in test_injector.js - * - * @deprecated Use `TestBed.configureTestingModule instead. - */ -export function addProviders(providers: Array): void { - if (!providers) return; - TestBed.configureTestingModule({providers: providers}); -} - - -/** - * @deprecated - */ -export function beforeEachBindings(fn: Function): void { - beforeEachProviders(fn); -} function _it(jsmFn: Function, name: string, testFn: Function, testTimeOut: number): void { if (runnerStack.length == 0) { diff --git a/modules/@angular/upgrade/src/upgrade_adapter.ts b/modules/@angular/upgrade/src/upgrade_adapter.ts index d59c88ec66..e8caeab8af 100644 --- a/modules/@angular/upgrade/src/upgrade_adapter.ts +++ b/modules/@angular/upgrade/src/upgrade_adapter.ts @@ -114,8 +114,6 @@ export class UpgradeAdapter { /* @internal */ private providers: Provider[] = []; - // the ng2AppModule param should be required once the deprecated @Component.directives prop is - // removed constructor(private ng2AppModule: Type) { if (!ng2AppModule) { throw new BaseException( diff --git a/modules/@angular/upgrade/test/upgrade_spec.ts b/modules/@angular/upgrade/test/upgrade_spec.ts index 2e9ba94ac8..f17315fa8b 100644 --- a/modules/@angular/upgrade/test/upgrade_spec.ts +++ b/modules/@angular/upgrade/test/upgrade_spec.ts @@ -284,41 +284,6 @@ export function main() { ref.dispose(); }); })); - - - // this test should be removed ones the deprecated @Components.directives prop is removed - // we should rewrite all of the tests in this file to use modules instead. - it('should downgrade ng2 component that is part of a module', async(() => { - const ng1Module = angular.module('ng1', []); - - ng1Module.component('ng1Component', {template: ''}); - - const SpecialValue = new OpaqueToken('special test value'); - - const Ng2Component = Component({ - selector: 'ng2-component', - template: 'test: {{value}}' - }).Class({ - constructor: [ - Inject(SpecialValue), function Ng2Component(value: number) { this.value = value; } - ] - }); - const Ng2AppModule = - NgModule({ - declarations: [Ng2Component], - imports: [BrowserModule], - providers: [{provide: SpecialValue, useValue: 23}] - }).Class({constructor: function Ng2AppModule() {}, ngDoBootstrap: function() {}}); - - const adapter = new UpgradeAdapter(Ng2AppModule); - ng1Module.directive('ng2Component', adapter.downgradeNg2Component(Ng2Component)); - var element = html(''); - adapter.bootstrap(element, ['ng1']).ready((ref) => { - expect(multiTrim(document.body.getElementsByTagName('ng2-component')[0].innerHTML)) - .toEqual('test: 23'); - ref.dispose(); - }); - })); }); describe('upgrade ng1 component', () => { diff --git a/modules/playground/src/web_workers/input/loader.js b/modules/playground/src/web_workers/input/loader.js index 114d799da3..844ad55f44 100644 --- a/modules/playground/src/web_workers/input/loader.js +++ b/modules/playground/src/web_workers/input/loader.js @@ -16,7 +16,6 @@ System.config({ '@angular/common': {main: 'index.js', defaultExtension: 'js'}, '@angular/platform-browser': {main: 'index.js', defaultExtension: 'js'}, '@angular/platform-browser-dynamic': {main: 'index.js', defaultExtension: 'js'}, - '@angular/router-deprecated': {main: 'index.js', defaultExtension: 'js'}, 'rxjs': { defaultExtension: 'js' }