Tagged Questions
0
votes
0answers
19 views
Angularjs how to run loader before send request in module?
I have module in Angularjs. In this model, before render page, I need to receive some user data Wallet.getUserWallet();
var app = angular.module('Order', ['ngRoute', 'ngAnimate']);
...
0
votes
0answers
34 views
Dynamically created custom directive not linking ng-model to $scope
I have created a dynamic custom directive which has a bidirectional ng-model, But for some reason controller cannot access the ng-model $scope binding and I tried without dynamic custom directive by ...
1
vote
1answer
25 views
angularjs pass newly array created in attribute to directive
I've created this fiddle to show my issue...
http://jsfiddle.net/dQDtw/
I'm passing a newly created array to a directive, and everything is working out just fine. However, I'm getting an error in ...
0
votes
0answers
18 views
How do I properly implement scroll to fixed jquery plugin as angularjs directive?
I am new to AngularJS and am currently having trouble converting a
jQuery plugin (the scroll to fixed plugin) into an AngularJS directive.
Here is my html for the navigation bar. Above it is a ...
0
votes
1answer
33 views
Angularjs Dynamically add new div with child elements and model
I have a jsfiddle set up at http://jsfiddle.net/skwidgets/gnvVY/13/
Basically there is a div with a few form elements in it including two drop down menus a radio button group and a link to remove ...
2
votes
1answer
33 views
angular form validation inside callback function - angular 1.2.5
I'm working an application with indexedDb as storage. In one of the forms while checking for the existence of a key I'm facing a strange error. Below is my validation directive code
...
0
votes
1answer
23 views
How to bring nested array of items in table format using ng-repat in angularjs?
I want to bring the table of items for each location using ng-repeat. I can't get around it using ng-repeat for the following structure. Please someone help me. Thanks in Advance.
The structure is.
...
-1
votes
1answer
16 views
Angular Directive not working within table element
I have a directive that for some reason isnt rendering! The controller is working fine, and other angular parts are loading within that module, so I havent broken angular as such. Simply the directive ...
0
votes
1answer
53 views
Angular JS: How to fetch data together collectively over one ajax call?
Use case: I have comment sections like Facebook, associated with items (e.g. photos). Pages contain multiple comment sections. I'm fetching the comments from an API after the page is loaded. The API ...
0
votes
2answers
25 views
Angular.js Showdown is not working
I'm adding Showdown.js to my angular project and my directive is like:
angular.module('myApp', []).directive('markdown', function() {
var converter = new Showdown.converter();
return {
restrict: ...
0
votes
1answer
9 views
What is dateFilter and where can I find out more about it?
I am going through the Angular documentation on directives: http://docs.angularjs.org/guide/directive
One of the examples on the page (full working example here ...
2
votes
1answer
53 views
AngularJS directive - avoiding jQuery-esque architecture
I'm trying to create a directive for a gallery, similar to the People tile in Windows 8. Meaning - the directive will swap images randomly within a matching 2x2 or 3x3 grid (depending on the amount of ...
0
votes
1answer
30 views
Angularjs isolated scope dynamically pass attribute name
I am trying to make a directive which make carousal from controller data
here is my
---------- controller---------
myApp.controller('myCtrl', function($scope){
$scope.outfit = {
...
0
votes
1answer
26 views
Triggering chosen:open event in angular.js
I'm using this chosen directive for angularjs. It's working great. But what I want to do is trigger chosen:open event to programatically open the dropdown which can be found in chosen documentation. ...
1
vote
1answer
51 views
How do I test the angularjs directive?
appD.directive "check",->
restrict: "EA"
require: "ngModel"
link: (scope, el, attrs, ngModelCtrl) ->
old_val = scope.budget
el.on "blur", (e) ->
...
0
votes
1answer
31 views
Is a $compile needed or is my directive wrongly structured?
Reading the documentation I'm not sure if I should be doing a pre-compile of this directive or if my methodology doesn't work. The error i get is an "unexpected token email in emails".
Is it possible ...
0
votes
1answer
31 views
Trouble iterating, and parsing application data
I am working on my first AngularJS web-app and have been stuck trying to iterate and parse some data. I am trying to display how many users (and ideally their name) are currently connected to my ...
0
votes
1answer
32 views
how does ng-controller directive create a new child scope?
I was going through the ng-controller tutorial on angularjs.org website. I came across a scope inheritance example in http://jsfiddle.net/api/post/library/pure/ . Here the author says the ...
0
votes
1answer
25 views
best way to write Jasmine Test for DOM directive
I am a newbie to Jasmine BDD test for Angular JS - Can any one tell me a simple test case for this
My Directive
var app = angular.module('gls', []);
app.directive('changeBg', function() {
...
0
votes
1answer
14 views
Angularjs Inter directive communication (parent-child directives) with a named ctrl of the parent directive
from the docs, and numerous other examples, It seems that the best way to handle common functions and communication between directives is requiring a "parent" directive and then the controller of the ...
1
vote
3answers
52 views
Angular directives with ng-if seem to loose model
I am fairly new to Angular and trying to make a directive that will construct a form input, usually a text-input, but sometimes a select box based on whether or not the input is associated with an ...
1
vote
1answer
43 views
Angular directives update on ng-repeat
I would like my ngDirective to be updated each time my ng-repeat is updated.
My code looks like:
<div ng-cotroller="SomeCtrl">
<div ng-repeat="i in data" myDirective>
{{i}}
...
1
vote
1answer
20 views
Kendoui with Angular - Cannot see grid
I am trying to use kendo ui with angular, I have downloaded kendo.all.js and angular-kendo.js
I have created a simple controller
var testApp = angular.module('testApp', ['ngRoute', ...
1
vote
2answers
60 views
Build html in server and bind to ng-repeat
I have some table that ng-repeat is building. the table contains a lot of data, and sometimes the build phase of the html is taking 10-20 seconds on weak computers.
So i've started to explore about ...
1
vote
1answer
26 views
AngularJS directive link function not being called
I am trying to use angular-http-auth library with bootstrap modal window. Modals are working fine but I have problems with directives.
Here is a jsfiddle link - http://jsfiddle.net/jCUSh/85/ . I am ...
-1
votes
1answer
20 views
ng-change is not working for this code
My Html
<select class="form-control input-sm" ng-change="ChangeHistogramDayCount(1)">
<option value="7">Last 7 days</option>
...
-1
votes
1answer
26 views
ng input number with input type = text
I would like to use angular's number validation, however it looks like it requires input type=number? usually this would be fine, except I don't want the up and down arrows that appear to the right of ...
0
votes
2answers
38 views
How to priorities custom events on ng-click events?
I created an angular js app for the web.
I added an input text box and i added a ng-on-blur event.
Because i had problems with ng-blur i took custom ng-on blur:
it look like this in my code:
...
0
votes
1answer
21 views
Angularjs : accessing service methods from directive's link function
i have a directive, and in its link function i want to access methods from a service. My code for directive is
AppDirectives.directive('feed',['FeedService',function() {
return {
restrict : 'AE',
...
1
vote
1answer
23 views
angularjs unable to find templates directory, flask as backend
I am using flask as backend and angularjs on client-side
my directory structure:
dew:
->app.py
->templates
->hello.html
->test.html
->static
->js
...
0
votes
1answer
52 views
Directive - Modify DOM in link function
I'm trying to modify the margin of some element in link function.
This is my code:
scope.size = (($("#highlight .thumbs li").width() * $("#highlight .thumbs li").size()) + (20 * ...
2
votes
0answers
37 views
AngularJS Directives: Are we not supposed to use the suffix “start”?
Is this a bug or is there documentation somewhere that says not to use the suffix "start" in the name of a directive? Only the 'finish' directive works.
HTML:
<html ng-app="myApp">
...
...
0
votes
1answer
26 views
Replacing static text content inside ngrepeat with ngclick directive in AngularJS
I've tried so many different things here with no luck. Basically i have an array of strings (just sentences). I need to ngRepeat over those and output them. No problem. But I need to be able to do a ...
4
votes
2answers
83 views
Javascript: unable to clearTimeout
I'm trying to call a function after a short delay after a user stops typing, but clearTimeout() does not seem to be doing what I think. The following is inside an Angular JS controller.
$scope.typing ...
0
votes
2answers
38 views
How to display ng-model input value as currency in angular?
I'm having in html
<input type="text" ng-model="price" >
<h2>{{ price | currency}}</h2>
In controller
$scope.price = 10;
Which displays **$10** in h1 if i change the value ...
0
votes
1answer
34 views
Angularjs directive for checkbox with ng-model
I have a directive that work on check-box that also has ng-model.
In the directive on link function the check box not get the value of the model.
It is work if add timeout( doesn't matter how long, ...
1
vote
2answers
53 views
Angular js directive and repeater issue
i have this piece of code here
var app = angular.module('app', ['ngRoute'])
.directive('loadObject', function (repository, $rootScope) {
return {
scope: {
loadObject: '@'
...
-1
votes
0answers
30 views
Find related directive to element
I'm just curious but I was wondering if there was a way to target an element and grab it's controlling directive. ie. something like angular.element('#id').directive().
If there's no direct way of ...
-1
votes
2answers
28 views
When i require ngModel controller how do I access a property of the model controller
I am using ng-repeat and setting a model with it similar to the following
<div ng-repeat="thing in things" ng-model="thing" my-directive>
{{thing.name}}
</div>
then in my ...
0
votes
1answer
39 views
Angular.js decorated directive doesn't get the directive scope
trying to decorate typeahead directive from angular-ui-bootstrap according to this blog post and running into some trouble. I need to replace the keydown binding (until some PR would fix it to behave ...
1
vote
3answers
65 views
How to build components cleanly/structure logic in AngularJS
I have a shopping cart component in my app. It lives in a controller. The controller is instantiated in a partial which is loaded to the page on demand (icon in menu bar).
app.controller('CartCtrl', ...
0
votes
1answer
61 views
Illegal use of ngTransclude directive in the template
I have two directive
app.directive('panel1', function ($compile) {
return {
restrict: "E",
transclude: 'element',
compile: function (element, attr, linker) {
...
1
vote
0answers
38 views
ng-upload not working on Firefox 26 and Chrome 31
I am using the directive ng-upload from here.
This is the version that I am using.
On "Chrome 32 Aura" the directive is working great, but:
On Chrome 31 I am getting the error "Response is not a ...
0
votes
2answers
38 views
How can I execute code after $digest is complete?
I am having a sortable list that gets populated by data in my Angular Controller. This list also contains an extra element containing some controls that can also be dragged
What I want do do, is make ...
2
votes
1answer
25 views
AngularJS Directive Value
I have an AngularJS directive. My directive is restricted to be used as an attribute. However, I want to get the value of the attribute. Currently, I have my attribute defined as:
...
1
vote
1answer
29 views
Angular JS- trying to create video selector the “angular way”
I have a page that has links to multiple videos. Video thumbnails are displayed in a list, and when you click on one of them, that video plays in the top, common video player.
If I were doing this in ...
0
votes
1answer
39 views
Access property of a directive from parent controller
I have a datetime directive that contains two properties in its scope: date and time. How can I access these properties from the parent controller? I tried doing this
<div id="inputs" ...
0
votes
1answer
29 views
Run JavaScript when Angular controller has loaded DOM
I have an Angular template with an ng-repeat. That ng-repeat loads up textareas which I would like to autosize based on their contents. In order to do that, I need to initialize a plugin on each ...
1
vote
1answer
40 views
AngularJS - animation callback / sequence
I'm just finding my way with Angular, and more importantly trying to find my way without jQuery!
I'd like to have a view that shows a loading spinner while data is fetched from the server, and when ...
0
votes
0answers
16 views
Using ScrollSpy in AngularJS
I'm new to AngularJS. I'm using AngularJS 1.2.5 and Bootstrap 3.0. I'm trying to include ScrollSpy in my app. However, I'm having some challenges. I'm trying to incorporate the code found here. ...