fix(e2e): adds events to hello world static.
Extends e2e test to cover events.
This commit is contained in:
@ -20,8 +20,8 @@ import {bootstrap, Component, Decorator, TemplateConfig, NgElement} from 'core/c
|
||||
// The template for the component.
|
||||
// Expressions in the template (like {{greeting}}) are evaluated in the
|
||||
// context of the HelloCmp class below.
|
||||
inline: `<div>{{greeting}} <span red>world</span>!</div>
|
||||
<button (click)="changeGreeting()">change greeting</button>`,
|
||||
inline: `<div class="greeting">{{greeting}} <span red>world</span>!</div>
|
||||
<button class="changeButton" (click)="changeGreeting()">change greeting</button>`,
|
||||
// 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
|
||||
|
@ -19,7 +19,8 @@ function setup() {
|
||||
componentServices: [app.GreetingService],
|
||||
template: new TemplateConfig({
|
||||
directives: [app.RedDec],
|
||||
inline: `{{greeting}} <span red>world</span>!`})
|
||||
inline: `<div class="greeting">{{greeting}} <span red>world</span>!</div>
|
||||
<button class="changeButton" (click)="changeGreeting()">change greeting</button>`})
|
||||
})]
|
||||
});
|
||||
|
||||
@ -84,6 +85,10 @@ function setup() {
|
||||
reflector.registerSetters({
|
||||
"greeting": (a,v) => a.greeting = v
|
||||
});
|
||||
|
||||
reflector.registerMethods({
|
||||
"changeGreeting": (obj, args) => obj.changeGreeting()
|
||||
});
|
||||
}
|
||||
|
||||
export function main() {
|
||||
|
Reference in New Issue
Block a user