im trying angualr from the zombie v0.12.11 headless browser running in node v0.6.6
B = require('zombie')
b = new B
b.visit('http://127.0.0.1:8001/', { debug: true}, function(e, b){console.log(b.html())})
the index.html under this url is served via express and it does work in chrome for example, but in zombie, i can't see the {{…}} templates processed.
is there any special treatment required to run angular in zombie?
am i missing something?
--
tom
ps: here is my index.html
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<head>
<script src="http://code.angularjs.org/0.9.19/angular-0.9.19.min.js" ng:autobind></script>
<script>
AppController.$inject = ['$xhr']
function AppController ($xhr) {
var that = this
this.$xhr = $xhr;
this.$xhr.defaults.headers.post['Content-Type']='application/json';
this.firms = {}
this.firm_cnt = Object.keys(this.firms).length
$xhr('GET', '/firms', function(code, res) { that.firms = res })
}
</script>
</head>
<body >
<div ng:controller="AppController">
{{firm_cnt}} Firms: <span ng:repeat="firm in firms">{{firm}}, </span>
</div>
</body>
</html>
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
i should try those 1st, indeed…
but what i tried instead is http://www.phantomjs.org (http://www.phantomjs.org/)/
another webkit based headless browser and
it gave a perfect, pdf printout for my request for quotation (using angular 0.9.19)
with all the background colors (black and silver :) *by default*!
no tedious config required!
just try it for yourself:
curl -O http://phantomjs.googlecode.com/files/phantomjs-1.4.1-macosx-static-x86.zip
unzip phantom*zip
cd phantom*/
time bin/phantomjs examples/rasterize.js http://google.com google.pdf a4; open google.pdf
real 0m5.933s
user 0m1.174s
sys 0m0.427s
--
tom