Nice examples posted.
I just changed my view like the following

*{{response.files.append(URL('static','angular-1.2.2/angular.js'))}}*
*{{response.files.append(URL('static','controllers.js'))}}*
*{{extend 'layout.html'}}*

*<div ng-app="myApp"*>
  <div ng-controller='HelloController'>
      <input ng-model="search"/>
      <div ng-repeat="x in greeting|filter:search">
          <li class="label label-success">[[x]]</li>
      </div>

  </div>
*</div>*

This way i have both at the same time, web2py goodies and angular goodies.

Regards
António


2013/12/23 rppowell <[email protected]>

> There are several ways to overcome the syntax collision with handlebars:
> 1. Change web2py's delimiter syntax to something other than
> double-curly-braces.
> 2. Have custom web2py html-helpers
> 3. Change handlebars's delimiter syntax.
> 4a. Have separate files for the handlebars templates - ng-include.
> 4b. Have separate files for the handlebars templates - templateURL.
> 5. Avoid using expressions
>
> See the following:
>
> http://www.web2pyslices.com/slice/show/1894/web2py-and-angularjs-handlebars-delimiters
>
>
> On Tuesday, January 29, 2013 8:12:30 AM UTC-8, Dirk Krause wrote:
>>
>> Hi,
>>
>> I am trying to use web2py to manage a database and display the resulting
>> JSON in AngularJS.  To render an angular compatible view I need to pass raw
>> html in a view (for example the html needs to start with '<html ng-app>'
>> and so forth). Of course I could place the files in the static folder, but
>> then I can't protect the files via @auth.requires_login() etc.
>>
>> What would be the best way to achieve that?
>>
>> Thank you,
>>   Dirk
>>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to