angular-foundation

Angular directive templateUrl won't render on script tag

馋奶兔 提交于 2019-12-25 09:35:02
问题 Originally, I had asked why the partial that I've defined in my controller and ng-template won't populate the modal. After having no success loading any directive on the script tag - I believe that the routing method we are using is what is circumventing the script from finding the partial. The directive's templateUrl returns 404 when invoked via the modal ng-click="open()". Everything resolves correctly if invoked on other elements. Directive loads templateUrl on div: <div data-modal-partial

Different errors for a single input in Foundation Abide / AngularJS

余生颓废 提交于 2019-12-24 14:23:10
问题 I'm trying to setup a form with Foundation and I'm finding it difficult to do more than basic error checking. Lets say I have the following input field: <input pattern="username" required type="text" placeholder="username" /> Assuming the username regex is a custom pattern something along the lines of this: ^[A-Za-z]{3,6}$ What I need to be able to do is show different errors depending on whether the string in the input field is above or below that character limit. As far as I can tell

How to pass data to an angular-foundation modal $scope?

纵饮孤独 提交于 2019-12-11 04:58:10
问题 I am using angular-foundation and specifically the modal http://madmimi.github.io/angular-foundation/#/modal , i am confused in how to pass data to a modal while using one controller , i want to take an array value and update the modal to show a particular user info ,Ex: $scope.updateUserInfo = $scope.user[index] , the only issue is how to pass the data to the modal . myApp.controller('users',function ($scope,$location,$http,$modal,msg) { $http.get('api/v1/users') .success(function (data

Can I access a form in the controller?

浪尽此生 提交于 2019-11-26 15:47:30
I'm currently using the following. $scope.$$childHead.customerForm[firstName] , so that: <form name="customerForm"> <input type="text" name="firstName" ng-model="data.customer.firstName" tabindex="1" ng-disabled="!data.editable" validationcustomer /> </form> But this only works in Chrome. Now I tried the following: $scope.editCustomerForm[firstName] , so that: <form name="customerForm" ng-model="editCustomerForm"> <input type="text" name="firstName" ng-model="data.customer.firstName" tabindex="1" ng-disabled="!data.editable" validationcustomer /> </form> Which doesn't work. Note my form is

Can I access a form in the controller?

让人想犯罪 __ 提交于 2019-11-26 04:36:51
问题 I\'m currently using the following. $scope.$$childHead.customerForm[firstName] , so that: <form name=\"customerForm\"> <input type=\"text\" name=\"firstName\" ng-model=\"data.customer.firstName\" tabindex=\"1\" ng-disabled=\"!data.editable\" validationcustomer /> </form> But this only works in Chrome. Now I tried the following: $scope.editCustomerForm[firstName] , so that: <form name=\"customerForm\" ng-model=\"editCustomerForm\"> <input type=\"text\" name=\"firstName\" ng-model=\"data