This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237737

Summary: Knockout syntax checker thinks binding string cannot be surrounded by braces
Product: web Reporter: eanon254
Component: KnockoutAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: phejl
Priority: P3    
Version: 7.4   
Hardware: Macintosh (x86)   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description eanon254 2013-10-29 08:42:12 UTC
The syntax

    <div  data-bind="html: errorFlash"></div>

is conventional. However, the syntax

    <div  data-bind="{html: errorFlash}"></div>

also works. The code at
https://github.com/knockout/knockout/blob/master/src/binding/expressionRewriting.js
line 48 explicitly strips any leading brace from a binding string and ignores it, treating it as acceptable syntax.

The knockout syntax checker in Netbeans thinks that it's an error to surround a binding string with braces.

Shouldn't the two agree?
Comment 1 Vladimir Riha 2013-10-29 09:14:51 UTC
Reproducible

Product Version: NetBeans IDE Dev (Build 201310290001)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)