[rt-users] Bare bones javascript that failes using Angular.js data-ng-repeat...
Keith Creasy
kcreasy at aph.org
Thu May 12 14:39:30 EDT 2016
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…
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Angular Test in RT</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://tech.aph.org/~keith/ngTest.js" type="text/javascript"></script>
</head>
<body ng-app="mainApp">
<h1>Angular Test in RT</h1>
<div ng-controller="mainController">
<table id="development" style="width:100%">
<h2>People/h2>
<thead>
<tr>
<th>Last</th>
<th>First</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="record in names | orderBy: 'lastName'">
<td>{{record.lastName}}</td>
<td>{{record.firstName}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
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%EF%BF%BDin%EF%BF%BDnames%20%7C"
<!-- ngRepeat: record�in�names | orderBy: 'lastName' --> rderBy%3A%20'lastName'
G/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:6:416
Ce</<.compile at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:279:13
Z at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:65:273
O at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:235
O at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
O at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:55:365
K at 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 at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:133:309
lf/this.$get</r.prototype.$apply at 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 at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:39:392
yc/c at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:19:480
yc at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:20:274
Zd at 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 at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:175:62
If at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:365
Hf/d at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js:35:314
angular.min.js:107:210
});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160512/bd63dda3/attachment.htm>
More information about the rt-users
mailing list