Hi, just by pure concidence I found Your posts. For the purpose of my project, I have created this simple stuff:
https://github.com/helgadeville/XMLTemplater Greetingz. On Wednesday, October 23, 2013 at 4:40:56 PM UTC+2, NV wrote: > > Hi Miguel, > > Have you had any luck with this or abandoned it? > > On Friday, February 1, 2013 9:28:44 AM UTC-5, Miguel Ping wrote: >> >> Hi Pawel, >> >> I know angular is not a templating engine and that I would be better off >> with mustache, underscore, handlebars or whatever. >> I just want to use the* ng-repeats* and *data-binding* to generate a xml >> document. The xml is simple enough to use just ng-repeats, ng-switchs and >> so on. >> >> My use case is the following: I need to POST a url with some xml data (I >> do not own this service); the xml will be fed with data from a $scope. >> In order to construct the xml, I am evaluating the unorthodox way of >> using angular's services to build it, *just for the sake of it*. >> >> Anyway I learn a little more of angular's internals by doing these kinds >> of 'exercises'. >> Thanks. >> >> On Friday, February 1, 2013 2:12:35 PM UTC, Pawel Kozlowski wrote: >>> >>> Miguel, >>> >>> AngularJS is _not_ a templating engine so using it to generate XML has >>> limited benefit, IMO. >>> What is your use case? >>> >>> Cheers, >>> Pawel >>> >>> On Fri, Feb 1, 2013 at 1:22 PM, Miguel Ping <[email protected]> wrote: >>> > I'd like to use angular's template engine to generate some xml >>> documents. >>> > Is it possible to use the template engine "standalone" to generate a >>> string? >>> > Something along these lines: >>> > >>> > <script type="text/ng-template" id="/xml.html"> >>> > >>> > <?xml version="1.0" encoding="UTF-8"?> >>> > <node1 ..> >>> > >>> > <Row ng-repeat="data in items"> >>> > >>> > <Item>{{data}}</Item> >>> > >>> > </Row> >>> > >>> > </node1> >>> > >>> > </script> >>> > >>> > >>> > Then, I would just need to invoke it within a service: >>> > >>> > ...['$some_unknown_dep', function(templateEngine)(){ >>> > var str = templateEngine.render('/xml.html', {items: [1,2,3]}); >>> > $http.post(..., str, ...) >>> > }]); >>> > >>> > Yeah, POSTing JSON would be easier, but it's not my service :\ >>> > >>> > Thanks! >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "AngularJS" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> an >>> > email to [email protected]. >>> > To post to this group, send email to [email protected]. >>> > Visit this group at http://groups.google.com/group/angular?hl=en-US. >>> > For more options, visit https://groups.google.com/groups/opt_out. >>> > >>> > >>> >>> >>> >>> -- >>> Question? Send a fiddle >>> (http://jsfiddle.net/pkozlowski_opensource/Q2NpJ/) or a plunk >>> (http://plnkr.co/) >>> Need help with jsFiddle? Check this: >>> >>> http://pkozlowskios.wordpress.com/2012/08/12/using-jsfiddle-with-angularjs/ >>> >>> Looking for UI widget library for AngularJS? Here you go: >>> http://angular-ui.github.com/ >>> >> -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
