diff --git a/.gitignore b/.gitignore index b9d6bd9..3835d69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +bower_components/ +node_modules/ + ################# ## Eclipse ################# @@ -192,7 +195,6 @@ $RECYCLE.BIN/ # Packages *.egg *.egg-info -dist/ build/ eggs/ parts/ diff --git a/Examples/ExampleSearchResults/Services/searchResults.txt b/Examples/ExampleSearchResults/Services/searchResults.txt index 3fa09c0..544cf01 100644 --- a/Examples/ExampleSearchResults/Services/searchResults.txt +++ b/Examples/ExampleSearchResults/Services/searchResults.txt @@ -2,7 +2,7 @@ { "id": 2, "name": "An ice sculpture", - "price": 12.50, + "price": 0.00, "tags": ["cold", "ice", "sculpture"], "dimensions": { "length": 7.0, diff --git a/Examples/OptionalBinding/example.html b/Examples/OptionalBinding/example.html new file mode 100644 index 0000000..05aa2f8 --- /dev/null +++ b/Examples/OptionalBinding/example.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +
+Loaded with function parameters +
+
+ +
+ +
+Loaded with template parameters +
+
+ +
+ +
+Loaded with template as data-bind-template attribute +
+
+ +
+Loaded with nested template with function parameters +
+
+ diff --git a/Examples/SimpleExample/Templates/simple.html b/Examples/SimpleExample/Templates/simple.html index ee8e225..2e75af5 100644 --- a/Examples/SimpleExample/Templates/simple.html +++ b/Examples/SimpleExample/Templates/simple.html @@ -2,9 +2,10 @@
- + +
diff --git a/Examples/SimpleExample/example.html b/Examples/SimpleExample/example.html index 1f59aa6..d54b719 100644 --- a/Examples/SimpleExample/example.html +++ b/Examples/SimpleExample/example.html @@ -9,24 +9,54 @@

Example of loading a template from a script tag within the same document.
+ + +
+ +
+ + + + + + + + + + diff --git a/Examples/index.html b/Examples/index.html index 20835a2..f14d59a 100644 --- a/Examples/index.html +++ b/Examples/index.html @@ -9,7 +9,7 @@ - +
@@ -23,6 +23,7 @@

Examples of jQuery.loadTemplate

  • Examples!
  • Basic Example
  • Simple Search
  • +
  • Optional Binding
  • @@ -48,7 +49,7 @@

    Code

    - + @@ -12,7 +12,8 @@ 'files/general.js', 'files/formatters.js', 'files/callback.js', - 'files/error.js' + 'files/error.js', + 'files/bindingOptions.js' ]); @@ -77,7 +78,7 @@
    - +
    @@ -86,7 +87,7 @@
    - +
    @@ -95,10 +96,40 @@
    - +
    + + + + + + + + + + + + +
    +