Skip to content

Commit b785503

Browse files
pkozlowski-opensourcetbosch
authored andcommitted
refactor(ProtoViewBuilder): improve error message for dangling bindings
Closes angular#3066
1 parent fc8f468 commit b785503

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/angular2/src/render/dom/view/proto_view_builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ function buildElementPropertyBindings(protoElement: /*element*/ any, isNgCompone
322322
propertyBindings.push(propertyBinding);
323323
} else if (!SetWrapper.has(directiveTempaltePropertyNames, propertyNameInTemplate)) {
324324
throw new BaseException(
325-
`Can't bind to '${propertyNameInTemplate}' since it isn't a know property of the '${DOM.tagName(protoElement).toLowerCase()}' element and there are no matching directives with a corresponding property`);
325+
`Can't bind to '${propertyNameInTemplate}' since it isn't a known property of the '<${DOM.tagName(protoElement).toLowerCase()}>' element and there are no matching directives with a corresponding property`);
326326
}
327327
});
328328
return propertyBindings;

modules/angular2/test/core/compiler/integration_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ export function main() {
12831283

12841284
PromiseWrapper.catchError(tcb.createAsync(MyComp), (e) => {
12851285
expect(e.message).toEqual(
1286-
`Can't bind to 'unknown' since it isn't a know property of the 'div' element and there are no matching directives with a corresponding property`);
1286+
`Can't bind to 'unknown' since it isn't a known property of the '<div>' element and there are no matching directives with a corresponding property`);
12871287
async.done();
12881288
return null;
12891289
});

modules/angular2/test/render/dom/view/proto_view_builder_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function main() {
3131
builder.bindElement(el('<div/>')).bindProperty('unknownProperty', emptyExpr());
3232
expect(() => builder.build())
3333
.toThrowError(
34-
`Can't bind to 'unknownProperty' since it isn't a know property of the 'div' element and there are no matching directives with a corresponding property`);
34+
`Can't bind to 'unknownProperty' since it isn't a known property of the '<div>' element and there are no matching directives with a corresponding property`);
3535
});
3636

3737
it('should allow unknown properties if a directive uses it', () => {
@@ -53,7 +53,7 @@ export function main() {
5353
binder.setComponentId('someComponent');
5454
expect(() => builder.build())
5555
.toThrowError(
56-
`Can't bind to 'unknownProperty' since it isn't a know property of the 'some-custom' element and there are no matching directives with a corresponding property`);
56+
`Can't bind to 'unknownProperty' since it isn't a known property of the '<some-custom>' element and there are no matching directives with a corresponding property`);
5757
});
5858

5959
});

0 commit comments

Comments
 (0)