0
votes
0answers
17 views

how to refer to another html element in a directive

For my convenience, i created a directive 'twActionButton' which is performing an API Call to my backend. some of these calls last longer & i want to indicate progress on the table row. ...
0
votes
1answer
21 views

AngularJs pass a fitler expression to directive with true at the end

I have a directive for the mover list called smDualList. The directive has the following template (partial code): <div> <select class="select-list" multiple ...
3
votes
1answer
53 views

How to link a controller to a directive in angular?

Lets say i have the following html structure: <div ng-app="testApp"> <div ng-controller="controller1"> {{controller1}} </div> <div ng-controller="controller2"&...
0
votes
1answer
14 views

Better to apply controller through ng-app directive or .config controller property

Is there any pros or cons to how I apply a controller to a document/element, either by using: ng-controller="appCtrl" with-in the HTML OR app.config(['$routeProvider', function($routeProvider){ ...
0
votes
1answer
24 views

Directive with isolate scope is not updated when an element pushed into the array in controller

I am trying to implement a basic recent searches list on my page. When the search button is clicked two inputs are concatenated and pushed to an array called "recentSearchItems". recentSearchItems ...
1
vote
1answer
16 views

Is it possible to render angular directive templates with isolated scope?

I came across a strange behavior with an angular directive using an isolated scope. Apparently the template is resolved using the old scope (even if transcluded), not the new one. This sounds a bit ...
1
vote
1answer
27 views

Ionic 3 Directive not working with ionic2-autosize

I am using Ionic, and have a ion-textarea i would like to auto size, i.e. expand as the user adds more text. I have found ionic2-autosize, which is a directive. However, I cannot seem to make this ...
0
votes
1answer
31 views

Define a scope in directive and use it in a view

I am using angular-treeview directive. Here , It is taking some time to load the tree, so I want to show a spinner for that time. So, I want to define a variable in directive and that will be used in ...
1
vote
0answers
18 views

Unable to remove focus/blur on md-select

I created a directive so I can focus and un focus on md-select. The directive works on foucsing on the element however the blur function does not. class FocusMeDirective { constructor() { ...
0
votes
1answer
44 views

Angular JS - Pluck on directive attr

I want to know if there is a way to get all the values of an object in a diretive in Angular JS. For example I have to following array: var example_data = [{ request: 'request1', totalRequests: 100, ...
0
votes
0answers
31 views

Angular 1 component save current input values when clicking outside the input or other inputs

i am using angular material and have a modal that pops up with places where you can edit data, this inline editing area is created using a components. When user click the values, these values become ...
0
votes
1answer
26 views

AngularJS Directive Event Listener Not firing

I have a directive like so: <div ng-repeat="(key, value) in $parent.item.detailedPlan track by $index"> <ul contenteditable="true" class="plan-actions" data-placeholder="Add Plan ..."> ...
0
votes
1answer
30 views

handle APlayer through angular js - play music dynamically

I am new to angular js - trying to build an audio play using Aplayer Task:- 1. Play music dynamically 2. On click of album get json data and add to aplayer (function() { 'use strict'; ...
0
votes
0answers
15 views

Angular component model not bound to transclude template

I don't understand why the transcluded template doesn't have access to the controller instance, it only seems to work when you actually use the templateUrl or template option. Demo: http://jsfiddle....
1
vote
1answer
37 views

AngularJS not putting an array in scope?

So I'm attempting to use Angular JS and the angularSoundManager module to create a music player. I can get songs and the player to work fine, but when I tried changing the main array to be albums with ...
0
votes
1answer
30 views

how to test ng-form item validity with jasmine in angular js

I try to unit test an angularjs directive with jasmine. My directive consists to complete, on blur event an id with leading zeroes and then check if this id already exists in a list of id (provided by ...
0
votes
1answer
31 views

Angular UI - Watch value from input in Popover Template

I'm trying to create a directive which uses the Angular Bootstrap Popover, which contains an input. Everything works fine, except the watch is not triggering. Here is a Plunker. The directive looks ...
1
vote
1answer
36 views

Using Same Directive for Different Data

I am a little new to Angular directives and was wondering if there was a way to use the same directive multiple times but bind in different data? (im sure theres a way i just dont know how!) For ...
0
votes
3answers
40 views

AngularJs not rendering value

I am new to AngularJS and need to use AngularJs to render my MVC controller Json output. Below is my MVC Controller that output Json: [HttpGet] public JsonResult GetAllData() { ...
2
votes
2answers
49 views

Repeat password validation not working

I am trying to validate password and repeat password in a form. Like this import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms'; this.registerForm = fb.group({ ...
2
votes
1answer
55 views

Two way binding is not working in AngularJS 1.x

I'm implementing a directive in such a way that it is accessible in multiple pages. My requirement is that when I hold down any key (as of now) I need to show the password. The password details will ...
0
votes
1answer
31 views

Generate html binding template for angular directive from javascript

I have written several unit tests recenlty and I wonder if there is a way to make html string (binding template) that appeals to directive (or component) from javascript function. Here is an example. ...
1
vote
1answer
33 views

get return value in callback(in angular directive) when a api is called from controller

I have created one directive in Angularjs in which I need to use getUsers() method, so that I can call Controller's Function. Controller's function is called.But Controller's Function is returning ...
0
votes
1answer
28 views

dirPagination - does not show paging links?

I am trying to use server side pagination in my application, but i am unable to do it as paging option is missing. i am using this tutorial for pagination. here is my code: JavaScript: $scope.vm={};...
0
votes
0answers
26 views

Enforce live validation on an input edit

Some background, I'm using a directive to enforce live validation of a currency input field. I do this by defining a regex pattern, listening for keypress events on an input field, and using pattern....
0
votes
1answer
27 views

Filling second drop-down multiselect with first drop-down in angularjs

I am new to angular and I am using the angular js-dropdown-multi select module from HERE. I am trying to fill the second drop-down based on first drop-down selection, the first issue I am facing ...
1
vote
1answer
61 views

AngularJS - href redirect to same domain cause page display before data are ready

I'm using Angular 1.4.1. I made a directive, a generic card with thumbnail and a link. The link is a generic absolute url, but usually lead to somewhere inside the app. So assuming I am in http://...
0
votes
0answers
25 views

accessing scopes in angularjs

I have a nested structure in the following way: <plan-item> <cityName> <chosen></chosen> </cityName> </plan-item> the chosen directive has an ...
0
votes
1answer
22 views

Angular Material Sidenav Not covering full screen on Scroll

On scroll, Sidenav is not taking 100% of the screen and it's also scrolling. <div layout="column"> <section layout="row" flex> <!-- sidenav content --> <md-...
0
votes
1answer
53 views

handle JavaScript plugin through angular js

I am new to AngularJS. I am developing a music app through AngularJS. For HTML5 player I am using this: https://github.com/DIYgod/APlayer. How to wrap aplyer inside angular so i only call directive ...
0
votes
0answers
20 views

AngularJS doesn't update two-way bound model used in custom directive when model is changed from code called by that directive

You'll have to bear with me on this one, because it's a little involved and isn't answered by the following questions: Two way binding Angularjs directives isn't working AngularJS: Parent scope ...
0
votes
0answers
34 views

ng-if scope inside of custom directive using parent scope clarification

I've found many examples (even on Stackoverflow), and also similar to this. However, still cannot figure out why my code is functioning not well, and need clarifications on that. I have a custom ...
1
vote
0answers
57 views

ng-required not working properly on select the value from dropdown

I have Date of birth drop down field,from that i selected the month,date and year values from dropdown.After selecting them as the error message showing previously it worked fine. my code for that: ...
0
votes
0answers
24 views

Custom directive under ng-repeat not working

I am new bie in angular js, I am trying to implement a overflow menu provided by carbon components i.e https://github.com/carbon-design-system/carbon-components/tree/master/src/components. If I dont ...
0
votes
0answers
16 views

Google place directive click listener in Angularjs

I am creating one simple application in angularJS that contain google address picker. i have found one directive for that, myAPP.directive('googleplace', function () { return { require: '...
0
votes
2answers
44 views

AngularJS directive to pass click action or do ui-router state change

I have a button (an a tag) that appears many places on my site. It's called "View Demo", and in some cases it simply calls an ui-sref to navigate to a demo page: <a class="btn btn-primary" ui-...
0
votes
0answers
28 views

I don't want to auto reflect chart with $watch in angulars js?

Right now I am implementing line chart in angular js. And I have written one directive for this, So it is working fine, But when I am putted $watch in this directive then every time chart will ...
1
vote
1answer
23 views

how ui-grid can customize dynamic number of header and data?

i have a ui-grid with this structure : http://plnkr.co/edit/qwfPVBfci4qbMEbwdNvM?p=preview how can I customize this grid to have different number of header or data . actualy i have to make dynamic ...
1
vote
1answer
26 views

Shared scope variable is not updating across directive

I am having a strange issue with directive, I am trying to create the plunkr, but before that posting this to SO, to see if I get any response. I have a following variable in controller: $scope....
0
votes
0answers
37 views

Angular JS - The directive is accessible between controllers

I am new to Angular and just wondering how come my directive is accessible between controller as I only register it into sub controller, not main app controller. Below is my code. app.module.js ...
1
vote
0answers
38 views

How can i use it without one time binding?

Yesterday I find solution for my angular carousel, but its has some issue with binding. Every time data of carousel should changing and now this example doesn't work , but when i add :: before ...
0
votes
2answers
31 views

Angular bindings with classes

angular with es6 classes giving me trouble and I can't find documentation on using this anywhere. I have this controller class AController { conversation: any; constructor() { 'ngInject'; }...
0
votes
0answers
33 views

How can you use an ng-controller inside of a script tag/ ng-template?

I am working on a modal image pop-up. For the project I'm working on, the script/ ng-template seems to be the only way to get it to work. It works for one image when I hard code the ng-src like this: ...
0
votes
0answers
24 views

Angularjs $decorate directive controller

I'm trying to decorate Angular Material directive and have a problem with Controller prototype functions: $provide.decorator('mdChipsDirective', ['$delegate', '$controller', function($delegate, $...
0
votes
1answer
25 views

AngularJS: Wrapping Directives and passing the attributes

I am looking for a way to extend or wrap a third-party directives html with Angular 1.5. Given a directive <lib-input></lib-input> I want to create a directive <my-lib-input> ...
0
votes
1answer
23 views

Show custom validation on form load(AngularJs 1.6)

I have a custom validation like this: app.directive('checkRfc', function() { return { require: 'ngModel', link: function(scope, element, attr, mCtrl) { function checkRfcValidation(...
1
vote
1answer
27 views

Angular - General Purpose Directives

I created a generic directive which I'd like to use in any Angular page in our site. I don't want to force each page to use the same app variable. How would I change this directive to be generic so ...
0
votes
0answers
34 views

Angular 1.x nested parent directive - how to isolate them?

I don't think I understand how to ask this question to Google, though I have tried. Imagine this structure in pseudocode: <div parent-directive="bar"> <input child-directive="foo" /> ...
0
votes
2answers
54 views

how to access element inside angularjs component $postLink

using this repo for angular boilerplate https://github.com/AngularClass/NG6-starter But I found hard to access the dom inside angular component's $postLink phase. Am I coding it wrong? Or do I have ...
0
votes
0answers
22 views

Waypoints trigger in mobile viewport

I'm learning code with angular. I try to trigger animatecss of directives using WaypointsJS combine with AngularJS. So here is my waypoint script $(document).ready(function(){ // hide our ...