angular expression working inside a script tag

后端 未结 2 1657
余生分开走
余生分开走 2021-01-28 10:01

How do I get an angular expression working inside a script tag... I am pretty new to this and need help? Here is an example of my java script code:

    

        
2条回答
  •  天涯浪人
    2021-01-28 10:45

    There is nothing special wrt use of AngularJS expressions inside partial templates.

    As already said your model is actually array - so you'll have to iterate through the items using ng-repeat like this:

    • Card id: {{card.id}} Card title: {{card.title}} Card details: {{card.details}}

    Please see working JSFiddle example.

提交回复
热议问题