[rt-users] Angular web page breaks when I try to access it from the local/html directory of RT 4.4.2

Keith Creasy kcreasy at aph.org
Wed May 11 17:31:31 EDT 2016


Hi. I'm still stumped. Here is a function that fails. It's in the angular controller. It works if the page that includes it is outside RT but failes when within RT... I commented out everything but the essential code.

function getTableData(data) {
console.log(data);
//	var tickets = rt.parseForNumbers(data);
var tickets = {1: 'ticket/1'};
// line 174...
angular.forEach (tickets, function (value, key) {
console.log(key+", "+value);
});
}


The error is-

SyntaxError: illegal character
rt-progress.js:174:25

It is the comma ',' in line 174.

Does anyone have any clues?

Thanks.

Keith


-----Original Message-----
From: rt-users [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Keith Creasy
Sent: Wednesday, May 11, 2016 4:30 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Angular web page breaks when I try to access it from the local/html directory of RT 4.4.2

Thanks Shawn. It is good to know at least that this could work. My problem is that the error I'm getting in the web-development console is pretty useless. It may be difficult to figure out just what's going wrong when I try to access it from the local/html directory in RT.


I am including the script like this, <script src="https://tech.aph.org/~keith/rt-progress.js. Obviously RT should not be touching this.


As I mentioned before, we have a similar page that includes a script in just the same way that works. The new angular.js version fails.


Another possible resolution would be if I can catch the "Not logged in" message and then call RT to let the user log in and use my page as the "tangent". I don't know how to do that or even if there is a way.


Thanks.

Keith

-----Original Message-----
From: rt-users [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Shawn Moore
Sent: Wednesday, May 11, 2016 3:40 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Angular web page breaks when I try to access it from the local/html directory of RT 4.4.2

On 2016年5月11日 at 13:54:01, Keith Creasy (kcreasy at aph.org) wrote:
> Hello.

Hi Keith,

> We have a similar script, that doesn't use angular.js, that works.
>  
> Any idea if RT is simply not compatible with Angular.js markup?

I’ve done some prototyping with Angular (1.x) within RT’s UI and I don’t recall having any particular problems.

> Is there any hope of updating RT to be more REST and json compliant as 
> well as making it so it doesn't try to mangle scripts?

We are eager to release a new REST API with JSON support, but as of right now it’s still in the works.

RT certainly shouldn’t be mangling scripts in any case!

> Keith

Thanks,
Shawn
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


More information about the rt-users mailing list