Tagged Questions
0
votes
0answers
12 views
AngularJS: binding an input to a number, but having custom display and edit modes
I want to create a directive that will behave as follows... On the HTML side:
<input data-ng-model="modelLogistics.inputValue1"
data-currency="{decSep:',' , thSep:'.'}">
...
0
votes
2answers
27 views
Nested directives don't work as expected
I have a generic directive
genericDirective
that is supposed to choose another specific directive
type1 directive if obj.type == "type1"
type2 directive if obj.type == "type2"
HTML
<div ...
2
votes
0answers
33 views
Evaluating an expression in an attribute of a directive in AngularJS
I did a lot of workaround, searched and researched, but I can't figure how to achieve my goal.
- The problem:
I have a the following situation, I want to avoid the user can
overlap commissions ...
0
votes
1answer
19 views
How share Service dynamic data between Controllers and Directives
I'd like to know what pattern to use, if I need my Service to share it's dynamic data between Controller, Directives, etc. The reason I mention dynamic, is because I'd like to load new data and this ...
0
votes
1answer
8 views
Angularjs: directive defined controllers communicating with child directives
I think I'm missing something when it comes to directives interacting with internal controllers. The API documentation is pretty poor on the Angular site. As far as I can tell, in order to access a ...
0
votes
0answers
34 views
Directive usage [on hold]
I'm a newbie to Angular, trying to make my first webapp using it.
I don't know if I've understood what directives are used for after reading some tutorials, so...
I want to append and fadein a list ...
1
vote
2answers
32 views
AngularJS numeric text input: Directive vs. Function
My project has a form with around 16 text fields. The input needs to be numeric, and different fields will have different min/max values. I was able to find the following jsfiddle ...
0
votes
0answers
24 views
AngularJS - dynamically remove directive from element
What is the proper way to dynamically add or remove directive from compiled and linked element?
I have a page that has bunch of inputs there (the list is pretty long, so i want to come up with a ...
0
votes
0answers
12 views
ng controller not working with jade template engine
I'm creating a form using angular JS, I've a ng-controller which is working totally fine with the html content, but when I convert this html content to jade and try to run again then angular doesn't ...
0
votes
2answers
22 views
AngularJs radio buttons are connected when using ng-form in ng-repeat
See this plnkr http://plnkr.co/edit/WZHMuYY3y2wbI6UysvY6?p=preview
When using a ng-form tag on an ng-repeat which contains a radio button group, the radio buttons are linked so if you check a radio ...
1
vote
1answer
20 views
Compiled Text Bind Does Not Show Up Until You Click A Button
I have a simple web app that lists users by first name and the city they live in.
When the user clicks their name or city, the elements will be replaced by two input elements. One for the name and the ...
1
vote
0answers
27 views
cannot use $rootScope.$new() in testing directive
I have a unit test for my directive:
describe('Directive: ov-tabs', function() {
var $compile, scope,subScope, element, template, doc,timeout,window;
...
1
vote
1answer
44 views
Scope inheritance for angular directives
I've created a tab control using angular directives. It is consist of tab, tab-item directives with new scope and tab-item-header, tab-item-body directives for which scope is not declared.
If I ...
1
vote
0answers
22 views
Return HTML string from ServiceStack cached set using .ToOptimizedResultUsingCache()
The cached response returns with all quotes escaped and \n characters added. The resulting string is also wrapped in quotes. When not cached, the html is returned just fine. How do I get past this? ...
0
votes
1answer
30 views
Custom hierarchical AngularJS directives with bi-directional binding
I'm trying to build a CRUD form using two custom directives. The first one (crudForm) is the main form directive, that holds all of the controls applied to this form (textboxes, textareas, checkboxes, ...
0
votes
0answers
32 views
Multiple validation directives not working
I'm trying to write my own set of directives. I have written following two directives:
eaValidateEmail (Validates the format of the email address)
eaValidateUnique (Will validate the uniqueness by a ...
0
votes
0answers
19 views
how to set active on angularjs bootstrap tab with static content
I am using Angular Bootstrap UI to show a tabset with static content. The bootstrap script I include is ui-bootstrap-tpls-0.6.0.min.js.
here is my markup:
<tabset>
<tab ...
0
votes
0answers
43 views
Passing a method to an angular directive ng-click event post declaration
In Angular and using Bootstrap 3.0, I would like to open a modal window to confirm an action where the modal action button continues to complete the request. I have put the modal code into a ...
0
votes
4answers
59 views
Use a condition in ng-repeat
I have a simple ng-repeat
<div ng-repeat="obj in someArray"></div>
I would like to use the custom directive "type1" if obj.type == "type1" and use the custom directive "type2" if ...
1
vote
1answer
24 views
How do I create an AngularJS directive based on another directive logic?
I am pretty new to AngularJS and creating directives.
Lets say I wanted a "delayed ng-show", that means it should work like ng-show, but the element should be visible after 2 seconds as opposed to ...
0
votes
0answers
19 views
angular-ui-router dynamic menu: TypeError: Cannot call method 'match' of undefined while rendering menu
i am new to angular and angular-ui-router and trying to create a menu.
I tried angular-ui-router and think that it fits for my needs.
now i have a problem while creating the menu with the ui-router ...
0
votes
0answers
25 views
Troubles using ng-if inside html template of a directive
I have recently start working with Angular.JS, and i have arrived to a scenario that i don't know how to correctly handle it.
Let me explain what i have and what i'm trying to do (i suppose it's the ...
0
votes
1answer
32 views
ngcontroller in Angular JS
I'm having some trouble understanding how to use ng-controller. I've a form controller in eventController.js.
<html ng-app>
<head>
<script src="angular.js"></script>
...
1
vote
1answer
26 views
Problems with local scope properties
I want declare directive in DOM and set scope properties like a Local scope property and can't do it...
If I have property type int, its fine but if dateType is string or datetime I have troubles...
...
0
votes
1answer
27 views
$parser.unshift??how does this work?
link: function(scope, elm, attrs, ctrl) {
ctrl.$parsers.unshift(function(viewValue) {
scope.pwdValidLength = (viewValue && viewValue.length >= 8 ? 'valid' : ...
0
votes
2answers
26 views
How to Assign value with ng-change in angular js
I have simple drop-down bind with angular model
<select ui-select2="{allowClear:true}" ng-model="product.Id" ng-change="{value = product.Id == 0}" data-placeholder="Select Warranty">
...
0
votes
0answers
35 views
ngModel.setViewValue not updating the html control
I've written a custom directive to update html controls depending on a condition.
Fiddle: http://fiddle.jshell.net/agvTz/212/
The custom directive requires ngModelController, $setViewValue has ...
2
votes
1answer
26 views
Cant see variables from parent function in a callback
I'm trying to write a directive which will handle "Enter" clicks, here's my code:
directive('onEnter', function() {
return {
link: function(scope, element, attrs) {
...
0
votes
0answers
36 views
How to use jQuery plugins in AngularJS?
I am using AngularJS 1.2 and trying to include a jQuery plugin via an Angular Directive. As an example I have chosen a plugin called spectrum. I have not included (and do not wish to include) jQuery ...
0
votes
0answers
17 views
List registered custom directives in AngularJS
I am writing a web app with many custom directives. Is there a way to view all the directives that have been registered for each module?