Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:55:55+00:00 2026-06-18T14:55:55+00:00

I am new to angularjs infact this is the first time I am using

  • 0

I am new to angularjs infact this is the first time I am using angularjs in one of my applications. The application is developed using django. But what I am trying at the moment is not related to django (i guess), I have a very simple template as follows:

<html xmlns:ng="http://angularjs.org" lang="en" ng-app"><head>
    <title>Testing Angular</title>
    <link rel="stylesheet" type="text/css" href="/static/css/application.css">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" »="" type="text/javascript">
    </script>
    <script type="text/javascript" src="/static/js/messages.js"></script>
    <script src="http://code.angularjs.org/angular-1.0.0.min.js"></script>
    <script src="/static/js/marketing/app.js"></script>
    <script src="/static/js/marketing/controllers.js"></script>

</head>
<body>
    <div id="content" ng-controller="UserListControl" class="ng-scope">
        [[ users.length ]]
    </div>
</body>
</html>

and following is the content for app.js and controllers.js respectively.

app.js

'use strict';

var newApp = angular.module('newApp', []) 
    .config(function($interpolateProvider){
        // To prevent the conflict of `{{` and `}}` symbols
        // between django templating and angular templating we need
        // to use different symbols for angular.
        $interpolateProvider.startSymbol('[[');
        $interpolateProvider.endSymbol(']]');
    });

controllers.js

function UserListControl($scope) {
    $scope.users = [   
        {   
            'name' : 'John Doe',
            'type' : 'Platinum',
        },  
        {   
            'name' : 'Matt Hill',
            'type' : 'Gold',
        }   
    ];  
}

but the template simply renders [[ users.length ]] instead of actually rendering the length.

I also tried the ngRepeat directive as follows:

<p ng-repeat="user in users">
    <p>[[user.name]], ([[user.type]])</p>
<p>

and

<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]"><td>[[ i ]]</td></tr>

the first ng-repeat directive renders:

<!-- ngRepeat: usr in users -->
<p ng-repeat="usr in users" class="ng-scope">
        </p>
<p ng-repeat="usr in users" class="ng-scope">
        </p>
<p><a href="#"></a>()</p>
<p></p>

and the second one renders:

<!-- ngRepeat: i in [0, 1, 2, 3, 4, 5, 6, 7] -->
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]" class="ng-scope"><td>[[ i ]]</td></tr>

why is it not able to recognize the variables ? what am i doing wrong ?

PS:

There are no errors in the console.

  • Angular Version: 1.0.0
  • Django Version: 1.4
  • Web Browser: Google Chrome 24.0.1312.68
  • Operating System: Ubuntu 12.04
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:55:56+00:00Added an answer on June 18, 2026 at 2:55 pm

    In your bootstrapping on the HTML element, the ng-app attribute should look like this:

    ng-app="newApp"
    

    That way angular will know to use the module you’ve defined in your app.js. I just tried it with your code, and the interpolateProvider changes work just fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using AngularJs for a new application. I feel I have solved a
I'm new to AngularJS and perhaps I'm going about this the wrong way, but
I am new to AngularJS and trying to have following code working. This's actually
I am fairly new to using AngularJS, and what I am trying to do
I'm new to angularjs and python and I have this problem. I've been trying
I'm trying to learn AngularJS. My first attempt to get new data every second
I am new to AngularJS and trying to learn the ropes. I'm using the
I'm new to AngularJS and i'm trying to imagine myself, how to do this
I am quite new to AngularJS, and I am stuck for a moment using
New programmer here, I am trying to understand and break down this code below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.