Skip to content

Instantly share code, notes, and snippets.

@rfong
Last active December 3, 2019 23:41
Show Gist options
  • Save rfong/2436aa0f6349f1c3b4e4 to your computer and use it in GitHub Desktop.
Save rfong/2436aa0f6349f1c3b4e4 to your computer and use it in GitHub Desktop.
/* Quick new angular app
* Accompany in template with:
<html ng-app="AppName"
ng-controller="AppCtrl">
*/
var app = angular.module('AppName', []);
app.config(['$interpolateProvider', '$httpProvider',
function($interpolateProvider, $httpProvider) {
// Change angular templating syntax from {{var}} to {[var]} so as not to
// conflict with Django.
$interpolateProvider.startSymbol('{[');
$interpolateProvider.endSymbol(']}');
}]);
app.controller('CtrlName', function($scope, $http) {
// put stuff here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment