Giter VIP home page Giter VIP logo

kite's People

Watchers

 avatar

kite's Issues

Check if an array is existing in json

What steps will reproduce the problem?
1. Have a simple array in your JSON:
"news": [
    { "title": "Title 1", "date": "08:59:00", "url": "http://www.google.ch?news=1" },
    { "title": "Title 2", "date": "07:00:00", "url": "http://www.google.ch?news=2" },
    { "title": "Title 3", "date": "04:37:00", "url": "http://www.google.ch?news=3" }
]

2. Then try to check in your Template if this is existing or not (Before the 
News you want to write "News"):
{{?news}}
News:
    {{#news}}
        - {{title}}<br>
    {{/news}}
{{/?}}

3. Do another check in the Template with {{?..}} It is not possible, because 
you would close two "{{/?}}"

I suppose, that multiple condition in each other should work. Do you have a 
workaround or fix date?

Thanks for your help.

Original issue reported on code.google.com by [email protected] on 17 Jul 2014 at 12:14

Getting upper level variable

What steps will reproduce the problem?
1. Create an object with one value and one array: (var1: 'some_value', var2: 
['val1', 'val2'])

2. iterate over the array and try to print the value of var1: {{#var2}} {{.}} ( 
{{var1}} ) {{/var2}}
3. {{var1}} is not found at that level.

What is the expected output? What do you see instead?
To print the value of the current array element and in parenthesis the (here 
fixed) value of var1.

What version of the product are you using? On what operating system?
Any

Please provide any additional information below.
I think that explains it

Original issue reported on code.google.com by [email protected] on 20 Apr 2013 at 9:30

Checking if field exists

What steps will reproduce the problem?
1. {{? field}}
2. field is undefined
3. script crashes

What is the expected output? What do you see instead?
script crashes. I expect the if to evaluate to false.

What version of the product are you using? On what operating system?
chrome

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Apr 2011 at 2:53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.