test: fix existing tests by removing usage of obsolete stuff like component level directives, AsyncCompleter and TestComponentBuilder
This commit is contained in:
@ -46,12 +46,7 @@ export class RedDec {
|
||||
// context of the HelloCmp class below.
|
||||
template: `<div class="greeting">{{greeting}} <span red>world</span>!</div>
|
||||
<button class="changeButton" (click)="changeGreeting()">change greeting</button>
|
||||
<div (keydown)="onKeyDown($event)" class="sample-area" tabindex="0">{{lastKey}}</div><br>`,
|
||||
// All directives used in the template need to be specified. This allows for
|
||||
// modularity (RedDec can only be used in this template)
|
||||
// and better tooling (the template can be invalidated if the attribute is
|
||||
// misspelled).
|
||||
directives: [RedDec]
|
||||
<div (keydown)="onKeyDown($event)" class="sample-area" tabindex="0">{{lastKey}}</div><br>`
|
||||
})
|
||||
export class HelloCmp {
|
||||
greeting: string;
|
||||
|
@ -7,12 +7,13 @@
|
||||
*/
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {WorkerAppModule} from '@angular/platform-browser';
|
||||
import {platformWorkerAppDynamic} from '@angular/platform-browser-dynamic';
|
||||
|
||||
import {TodoApp} from './index_common';
|
||||
|
||||
@NgModule({imports: [WorkerAppModule], bootstrap: [TodoApp], declarations: [TodoApp]})
|
||||
@NgModule({imports: [WorkerAppModule, FormsModule], bootstrap: [TodoApp], declarations: [TodoApp]})
|
||||
class ExampleModule {
|
||||
}
|
||||
|
||||
|
@ -6,18 +6,11 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgFor} from '@angular/common';
|
||||
import {Component} from '@angular/core';
|
||||
import {FORM_DIRECTIVES} from '@angular/forms';
|
||||
|
||||
import {Store, Todo, TodoFactory} from './services/TodoStore';
|
||||
|
||||
@Component({
|
||||
selector: 'todo-app',
|
||||
viewProviders: [Store, TodoFactory],
|
||||
templateUrl: 'todo.html',
|
||||
directives: [NgFor, FORM_DIRECTIVES]
|
||||
})
|
||||
@Component({selector: 'todo-app', viewProviders: [Store, TodoFactory], templateUrl: 'todo.html'})
|
||||
export class TodoApp {
|
||||
todoEdit: Todo = null;
|
||||
inputValue: string;
|
||||
|
Reference in New Issue
Block a user