How to pass data from popup on ionic


#1

hi I need you help please, I have a popup window,and my code is that

<script id="contact-modal.html" type="text/ng-template">
    <div class="modal">
        <ion-header-bar>
            <button type="reset" class="button button-clear" ng-click="closeModal()">
                <i class="ion ion-close"></i>
            </button>
        </ion-header-bar>
        <ion-content>
            <form ng-submit="saveCart(product)">
                <div class="row">
                    <div class="list">
                        <div class="col-50 zupa_left zupa_img_pro">
                            <img ng-src="{{img}}" alt="zupa"/>
                            <p>{{description}}</p>
                            <p>{{price}} Bs.</p>
                        </div>
                        <div class="col-50 zupa_left zupa_spin">
                           <!-- <ng-touch-spin ng-model="product.cant"  initval="0"  step="1">
                            </ng-touch-spin>-->
                            <input type="text" initval="0" step="1" ng-model="product.cant" ng-touch-spin>
                        </div>
                        <input type="hidden" value="{{price}}" ng-model="product.price" />
                        <input type="hidden" value="{{id_item}}" ng-model="product.iditem" />

                    </div>
                </div>
                <div class="row">
                    <div class="zupa_btn_cart">
                        <div class="text-center">
                            <button type="reset" class="button button-assertive" ng-click="closeModal()"><i class="ion ion-close"></i></button>
                            <button type="submit" class="button  button-positive"><i class="ion ion-ios-cart"></i></button>
                        </div>
                    </div>
                </div>
            </form>


        </ion-content>
    </div>
</script>

when a try pass data from ng-submit(proudct), the message error show me ( cant is undefined ) and same thing show me the other variables, the input:hidden-> are data recoverd and working fine, but when I send this data in my controller not show me nothing, please help me