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 - Knockout syntax checker thinks binding string cannot be surrounded by braces
Summary: Knockout syntax checker thinks binding string cannot be surrounded by braces
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: Knockout (show other bugs)
Version: 7.4
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 08:42 UTC by eanon254
Modified: 2015-09-09 11:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)