Hi Massmo,
On Friday, March 14, 2014 2:46:58 PM UTC+1, Massimo Di Pierro wrote:
>
> {{data.message + " world!"}}
>
> should be
>
> {{= data.message + " world!"}}
>
No... this part is fictional AngularJS code, just meant as an example.
I think you're missing the point of this thread, and that is whether web2py
should have a special variable to temporarily disable the parsing of {{ }}
and leave that to another parser, such as AngularJS. This would enable both
web2py and AngularJS to keep using the same delimiters.
I believe Django has this functionality. What I don't know is the reasoning
for their inclusion and possible caveats... @David Simmons, do you perhaps
know if there was a discussion there and what were the arguments? Have they
had any issues with the implementation?
Regards
> On Thursday, 13 March 2014 17:21:28 UTC-5, David Simmons wrote:
>>
>> Hi All (again).
>>
>> I did some digging around with the web2py source code and came up with
>> this.....
>>
>> https://gist.github.com/shortly-portly/9538005
>>
>> The usage is pretty straight forward. You can use normal Web2py tags {{
>> and }}. When you want to drop down into Angular, surround your stuff with
>> {{ verbatim }} and {{ endverbatim }}. For example
>>
>> {{ extend 'layout.html }} <------------- translated by web2py as normal
>>
>> {{ verbatim }}
>> <div ng-app="">
>> <input type="text" ng-model="data.message">
>> <h1>{{data.message + " world!"}}</h1> <----------- not touched by
>> web2py
>> </div>
>>
>> {{ endverbatim }}
>>
>> Could someone who knows more about the web2py source code let me know if
>> this looks like a valid change. I'd love to be able to submit it.
>>
>> cheers
>>
>> Dave
>>
>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.