angular2-flask icon indicating copy to clipboard operation
angular2-flask copied to clipboard

route respond with XML

Open cmh234 opened this issue 8 years ago • 0 comments
trafficstars

Hi I'm trying to have a route respond with an XML string like at this URL https://demo.twilio.com/docs/voice.xml. <Response> <Say voice="alice">Thanks for trying our documentation. Enjoy!</Say> <Play>http://demo.twilio.com/docs/classic.mp3</Play> </Response>

But I only get formatted HTML.

My test code is below: found In utils\twilio\twilio.component.ts

import { Component } from '@angular/core'; import { Router } from '@angular/router';

@Component({ selector: "twilio", template: <div [outerHTML]="xml"></div> })

export class TwilioComponent { xml = '<Response>\n' + '<Say voice="alice">Thanks for trying our documentation. Enjoy!</Say>\n' + '<Play>http://demo.twilio.com/docs/classic.mp3</Play>\n' + '</Response>'; } Any suggestions?

cmh234 avatar Aug 27 '17 04:08 cmh234