Mind that it may be easier to replace web2py delimiters than angular 
delimiters:

response.delimiters = ('<%','%>')

On Tuesday, 13 May 2014 11:58:03 UTC-5, Ramos wrote:
>
> *( i use [[ ]] to code angular data inside views)*
>
> It was very informative but this code example
>
> myApp.controller('empCtrl', ['$scope','$http',function($scope,$http) {
>     $scope.empresas = {{=XML(list)}};
>             
> }]);
>
> only works inside a script tag, inside a web2py view, because of the XML 
> helper.
>
> I would like to separate my angular code in a separate js file to keep 
> code more organized.
> Any ideas ?
>
> Second issue, ng-repeat inside a web2py view . I coded the link url to 
> documents in my web2py controller 
> *view*
> <input ng-model="search">
> <tr ng-repeat="emp in empresas|filter:search|orderBy:'empresa'" >
>   
>     *<td ><a href="[[emp.url]]">[[emp.empresa]]</a></td> *       
> </tr>  
> *code*
> def queryemp():
>     temp=[]
>     rows = db(db.empresa).select(db.empresa.empresa,db.empresa.id
> ).as_list()
>     for x in rows:
>         
> rows[rows.index(x)]['url']=URL('default','showemp',user_signature=True,args=x['id'])
>         temp.append(x)
>     return dict(list=gluon.contrib.simplejson.dumps(temp))
>
>
>
> I would like instead to do something like
>  <td ><a 
> href="{{=URL('default','showemp'*,args=[[emp.url]]*)}}">[[emp.empresa]]</a></td>
>  
>   
>
> but angular inside web2py brackets is not possible. I think...
>
> Comments appreciated.
>
> Regards
> António
>

-- 
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.

Reply via email to