How to use javascript inside a page with type=“text/ng-template”?

前端 未结 3 888
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-26 16:39

I have code like this:



        
3条回答
  •  孤独总比滥情好
    2021-01-26 17:21

    You can better add the following table-html to your template like this:

    菜名单价份数小计
    {{name}} {{price}} {{num}} {{total}}

    Ng-Repeat will render the necesarry table rows for every item in your obj variable. After that you will need to define $scope.obj in your controller since your angular app will look for that. I think that just definig var obj is not working, but I have never used it that way.

提交回复
热议问题