I am new to both angular and jade. I was wondering if angular can only be used with HTML, or if I could use the same angular call within a jade template? I have only seen angular templates being used with HTML, and have not found it used in any jade templates. is it possible to do such a thing? How would angular in a jade template look?
Yes you can. It would look something like:
body(ng-app)
button(ng-click="yourAngularFunc()")
You can download the angular-express-bootstrap-seed - A great starting point for writing AngularJS apps sauced with Twitter Bootstrap and backed by an Express-powered node.js server. this seed contains example of using jade template
For example:
.row
.col-lg-12
p This is the partial for view 2.
p
| Showing of 'interpolate' filter:
| {{ 'Current version is v%VERSION%.' | interpolate }}
来源:https://stackoverflow.com/questions/21099992/can-angular-be-used-within-a-jade-template