Can angular be used within a jade template?

后端 未结 2 1489
别那么骄傲
别那么骄傲 2020-12-21 04:43

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 an

相关标签:
2条回答
  • 2020-12-21 05:32

    Yes you can. It would look something like:

    body(ng-app)
        button(ng-click="yourAngularFunc()")
    
    0 讨论(0)
  • 2020-12-21 05:36

    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 }}
    
    0 讨论(0)
提交回复
热议问题