Bare bones javascript that failes using Angular.js data-ng-repeat

Hello all.

I am getting a different error now and have a bare-bones javascript and html document that works outside of RT but not when opened from the rt URL. It looks like RT is making some changes to the syntax of the data-ng-repeat attribute.

You can look at them yourself…

http://tech.aph.org/~keith/ngTest.html - this one works
http://tech.aph.org/rt/ngTest.html - this one does not.

Here is the HTML…

Angular Test in RT

Angular Test in RT

People/h2>

Last First
{{record.lastName}} {{record.firstName}}

The javascript in ngTest.js…

   var mainApp = angular.module('mainApp', []);

mainApp.controller(‘mainController’, function($scope) {

var people = [{firstName: ‘Tom’, lastName: ‘Jones’},
{firstName: ‘Linda’, lastName: ‘Smith’},
{firstName: ‘Scott’, lastName: ‘Moore’}];

$scope.names = [];

                            $.each( people, function(i) {

$scope.names.push(people[i]);
});

And finally the error I get when I try to open it from the RT URL…

Error: [ngRepeat:iexp]
http://errors.angularjs.org/1.4.8/ngRepeat/iexp?p0=record�in�names%20|"

rderBy%3A%20'lastName'

G/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:6:416
Ce</<.compile@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:279:13
Z@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:65:273
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:235
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
K@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:53:230
yc/c/</<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:99
lf/this.$get</r.prototype.$eval@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:133:309
lf/this.$get</r.prototype.$apply@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:134:12
yc/c/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:57
e@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:39:392
yc/c@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:480
yc@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:274
Zd@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:83
@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:294:192
b@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:175:62
If@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:365
Hf/d@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:314
angular.min.js:107:210

});

Hello all.

Still no success with this. I have narrowed it down to RT for some reason taking the space characters out of “record in development”, and similar expressions, in elements such this that use angular…

Gets changed to (where the ? is some unknown char)

Angular rejects this, of course, as a syntax error in the expression.

Is there anywhere in the RT code that might alter the text in an attribute such as this? It sure seems to be doing it.

I would appreciate any help with this, or some alternative to avoid the problem.

Thanks.

KeithFrom: rt-users [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Keith Creasy
Sent: Thursday, May 12, 2016 2:40 PM
To: rt-users@lists.bestpractical.com
Cc: Brandon Roller
Subject: [rt-users] Bare bones javascript that failes using Angular.js data-ng-repeat…

Hello all.

I am getting a different error now and have a bare-bones javascript and html document that works outside of RT but not when opened from the rt URL. It looks like RT is making some changes to the syntax of the data-ng-repeat attribute.

You can look at them yourself…

http://tech.aph.org/~keith/ngTest.html - this one works
http://tech.aph.org/rt/ngTest.html - this one does not.

Here is the HTML…

Angular Test in RT

Angular Test in RT

People/h2>

Last First
{{record.lastName}} {{record.firstName}}

The javascript in ngTest.js…

   var mainApp = angular.module('mainApp', []);

mainApp.controller(‘mainController’, function($scope) {

var people = [{firstName: ‘Tom’, lastName: ‘Jones’},
{firstName: ‘Linda’, lastName: ‘Smith’},
{firstName: ‘Scott’, lastName: ‘Moore’}];

$scope.names = [];

                            $.each( people, function(i) {

$scope.names.push(people[i]);
});

And finally the error I get when I try to open it from the RT URL…

Error: [ngRepeat:iexp]
http://errors.angularjs.org/1.4.8/ngRepeat/iexp?p0=record�in�names%20|"

rderBy%3A%20'lastName'

G/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:6:416
Ce</<.compile@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:279:13
Z@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:65:273mailto:Z@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:65:273
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:235mailto:O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:235
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365mailto:O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365mailto:O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365mailto:O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365mailto:O@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
K@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:53:230mailto:K@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:53:230
yc/c/</<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:99
lf/this.$get</r.prototype.$eval@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:133:309
lf/this.$get</r.prototype.$apply@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:134:12
yc/c/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:57
e@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:39:392mailto:e@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:39:392
yc/c@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:480mailto:yc/c@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:480
yc@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:274mailto:yc@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:274
Zd@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:83mailto:Zd@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:83
@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:294:192
b@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:175:62mailto:b@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:175:62
If@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:365mailto:If@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:365
Hf/d@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:314mailto:Hf/d@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:314
angular.min.js:107:210

});