look this http://www.web2pyslices.com/slice/show/1922/web2py-angularjs
Ovidio Marinho Falcao Neto
ITJP.NET.BR
[email protected]
[email protected]
Brasil
2014-08-08 12:05 GMT-03:00 piero crisci <[email protected]>:
> Yes i just did it :)
>
> {=DIV('[[greeting.text]]',**{'_ng-controller':'HelloController',})}}
> It works.....
>
> Il giorno venerdì 8 agosto 2014 17:00:42 UTC+2, Niphlod ha scritto:
>
>> dicts in python can't acced a key that holds '-' with that syntax.
>>
>> that being said, you can use the other one **{{'_ng-controller':
>> 'blablabla'}}
>>
>> On Friday, August 8, 2014 4:50:12 PM UTC+2, piero crisci wrote:
>>>
>>> Hello i am trying to use angular js with web2py.
>>> I would like to use gluon.html for render the html elements but i am
>>> having some problem .
>>> I modified angular js to use "[[" and "]]" as symbols.
>>>
>>> If i wrote the html code using normal tag the page is normally working:
>>>
>>> <div ng-controller='HelloController'>
>>> <p>[[greeting.text]], World</p>
>>> </div>
>>>
>>> I would like to change the html view in this way:
>>> *{{=DIV('[[greeting.text]] ', 'World', _ng-controller =
>>> 'HelloController')}}*
>>>
>>> The problem is using the char "-" as attribute of the DIV element
>>> attribute gives the following error
>>>
>>>
>>>
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>> 7.
>>> 8.
>>> 9.
>>>
>>>
>>> Traceback (most recent call last):
>>> File "C:\web2py\gluon\restricted.py", line 219, in restricted
>>>
>>> ccode = compile2(code, layer)
>>> File "C:\web2py\gluon\restricted.py", line 202, in compile2
>>>
>>> return compile(code.rstrip().replace('\r\n', '\n') + '\n', layer,
>>> 'exec')
>>>
>>> File "C:\web2py\applications\XXXXXX\views\default/helloworld.html", line
>>> 105
>>>
>>> SyntaxError: keyword can't be an expression
>>>
>>> Any clue how i can solve this problem?
>>> Thank for help
>>>
>> --
> 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.
>
--
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.