Cake Recipe:
1 - Download the angular.js to your /static/js
2 - Edit the file /static/js/angular.js
3 - Find the $InterpolateProvider() and replace "{{" with "{!".
eg:
edit angular.js find this function:
$ InterpolateProvider function () {
startSymbol var = '{!';
endSymbol var = '!}';
4 - Ready the "{{" and "}}" go with web2py
and "{!" and "!}" With AngularJs.
5- insert this line in views/layout.html
<script src="{{=URL('static','js/angular.js')}}"></script>
6- my view/index.html
{{extend 'layout.html'}}
<!-- Go in angular.js find function and modify is '{{' this '{!' -->
<html ng-app>
<head>
<title>AngularJS - Tableless</title>
</head>
<body>
<input type="text" ng-model="nome">
<p>Hello, Tableless! My name is: {! nome !}</p>
</body>
</html>
7-So no need to change in web2py but in angularJs, since he is the host.
Ps. Sorry im using google translate.
Comments (2)
0
wilson-ortiz-10019 10 years ago
Todo lo que necesitaba, =D muy bien explicado.
Gracias.
0
samuel-bonilla-11088 10 years ago
Genial...