Advertisement
riseriyo

$interpolaterProvider Angularjs and Django

Aug 4th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <!-- My HTML code in templates/index.html -->
  2.  
  3. {% load staticfiles %}
  4.  
  5. <!DOCTYPE html>
  6.  
  7. <html ng-app="tictactoe">
  8. <head>
  9. <title>Tic Tac Toe</title>
  10. <link rel="stylesheet" href="{% static 'css/foundation.css' %}" />
  11.  
  12. <script type="text/javascript" href="{% static 'js/angular.min.js' %}"></script>
  13. <script type="text/javascript" href="{% static 'js/app.js' %}"></script>
  14. </head>
  15.  
  16. <body>
  17. <section class="row">
  18. <header class="large-12 columns">
  19. <h1>Tic Tac Toe</h1>
  20.  
  21. <hr />
  22. </header>
  23. </section>
  24. <section>
  25. <div class="large-8 columns">
  26. <div ng-controller="BoardController as board">
  27. <div>
  28. I am <[4 + 6]>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="large-4 columns">
  33. <h3>Objective:</h3>
  34. <p>Demonstrate a tic-tac-toe game where the AI always wins by implementing the Minimax algorithm.</p>
  35. </div>
  36. </section>
  37. </body>
  38. </html>
  39.  
  40. // My JS code in static/js/app.js
  41. (function() {
  42. var app = angular.module('tictactoe', []);
  43.  
  44. app.config( function($interpolateProvider) { //$httpProvider,
  45. $interpolateProvider.startSymbol('<[');
  46. $interpolateProvider.endSymbol(']>');
  47. //$httpProvider.defaults.header.common['X-Requested-With'] = 'XMLHttpRequest';
  48. });
  49.  
  50. app.controller('BoardController', function(){
  51. //this.squares = boxes;
  52. this.label = "Hello, World";
  53. });
  54.  
  55. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement