0
votes
0answers
4 views

AngularUi tinyMce setup

How can I setup the toolbar of tinyMce editor? I'm usin angularUi directive. I'd like to show only a simple toolbar with text formatting like "bold,italic". Here's a ...
0
votes
0answers
17 views

Get original transcluded content in Angular directive

Is it possible to programmatically get the original transcluded content within an Angular.js directive? Within the compile function, $transclude seems to contain the template for mydirective, and ...
0
votes
0answers
9 views

anchor tags and dynamic views in angular.js

I'm taking my first steps with angular, looks promising but i have some issues, hope someone can help. i have a long html page divided to sections each section is an anchor tag, you can navigate to ...
0
votes
1answer
21 views

Newbie Angular Q - Modifying service output

I've been working on my first angular app all day and have a basic question. The goal is to create a text field with two strings describing the current url route and action like the following: You ...
0
votes
1answer
18 views

AngularJS: How to access a dynamically generated element within a directive

Say you have: pre: function preLink(scope, element, attrs) { element.append('<div id="foo">foo</div>'); } ... and then you want to get a handle on the new foo element. How is that ...
0
votes
0answers
25 views

Angular Element from Model

Is it possible to grap the element associated with the model from the model object in angular? Example: <di droppable ng-model="monkey" /> app.directive('droppable', ['$timeout', ...
0
votes
1answer
13 views

AngularJS - Dynamically creating elements that specify directives

I have a setup like this: Controller c broadcasts event e Directive d listens for e, and on e, writes to the DOM via append, and in so doing, creates new elements specifying a directive d2. IE ...
6
votes
2answers
97 views

AngularJS: What is the need of the directive's link function when we already had directive's controller with scope?

I need to perform some operations on scope and the template. It seems that I can do that in either link function or the controller function ( since both have access to the scope ) When is it the case ...
0
votes
1answer
18 views

How to reach a function from a directive that is defined in the inline controller

If I have a directive, that has its own controller defined in its body: directives.directive("formWrapper", ['User','$location', function(User, $location) { return { ... template: ...
0
votes
1answer
26 views

Using ng-model and ng-repeat within a directive

So I can't seem to quite figure this out. Basically, I am building a directive which consists of options, and I want to define those options in the directive, but define the default option in my ...
0
votes
0answers
32 views

Dynamically selecting filter in ngRepeat (based on item being repeated)

I created a filter (dynamicFilter) that takes an optional filter as an argument and applies it. Here's how it works: ng-repeat="item in items | dynamicFilter: item.filter" The problem is ...
1
vote
1answer
29 views

AngularJS + Coffeescript - 'Hello World' directive not working

I can't make the simplest of directives work in my AngularJS + Coffeescript project. I have this code in directives.coffee: 'use strict' app_name = "myApp" app = angular.module ...
0
votes
0answers
13 views

ColorBox with AngularJS, with ng-click bindings

Ok, so it's fairly easy to create a directive for a colorbox, as explained here: How to use Colorbox with Angular JS But what if you want to then bind buttons to ng-click events? Best practice would ...
0
votes
0answers
21 views

Add bootstrap popup behavior after AngularJS apply is done

I'm working on a timetable in angular JS with 3 years and 4 quarters per year. Users can drag courses into the timetable and need to see a warning in case there are too many courses in the quarter. ...
0
votes
0answers
27 views

Custom AngularJS attribute inside the directive with HTML page template

I want to create two directives: one of them should be an simple tag and another one should be an attribute for this tag. Another words I want to make something like this: <outer ...
1
vote
2answers
45 views

Strange behavior of nested Angular directives

I want to use my directives within other directives. The following example gives so strange results that I had to give up and ask this question. I would like someone to explain me what is going on ...
2
votes
1answer
29 views

AngularJS: How to map object to HTML attributes

let me describe what I am trying to do. I am building a really dynamic ng directive to build table based on data array and config object provided. What I want to know is how to assign attributes ...
1
vote
0answers
27 views

patch request using angularjs

I am working on an API using djang-tastypie as backend and AngularJs for front end. I am sending request fro CRUD using angularjs $http. GET, POST, PUT everything is fine but when I am trying to send ...
2
votes
1answer
34 views

Using ng-transclude inside ng-switch

I'm having trouble getting ng-transclude to work within an ng-switch-default directive. Here's my code: Directive: .directive('field', ['$compile', function($complile) { return { ...
0
votes
2answers
32 views

AngularJS directive multiple views

Lets say i have a customer model and i want to create different views of this model e.g. one detail view: image first name last name email phone and one showing only the picture and name: image ...
1
vote
0answers
24 views

Unknown angular error when using sorting directive

I have an angular directive that sorts columns in a table. prior to version 1.20 this worked but after upgrading to 1.20 I am getting the following error. Does anyone know what is wrong? Error: ...
0
votes
0answers
12 views

Directive with asynchronous compile transcluded into another directive

I know this is a bit of an edge case but I have an directive with a compile function whose compile step is asynchronous*, when it is transcluded into an outer directive with transclude: true, the ...
0
votes
1answer
23 views

how do I get ng-include directive to work with a Content Delivery Network?

Is it possible to get ng-include directive to work with a CDN? In this case: <div ng-include='http://cdn.somewebsite.com/templates/home.tpl.html'></div> The cdn sub-domain of ...
0
votes
2answers
33 views

AngularJS Group By Directive

I'm new to Angular and would like to learn the best way to handle a problem. My goal is to have a reusable means to create group by headers. I created a solution which works, but I think this should ...
0
votes
1answer
15 views

AngularJS - Trouble with directive changing value in controller

I'm getting large images from an API in my main controller. I have a directive that successfully lets me know when each image is loaded: app.directive('imageonload', function() { return { ...
0
votes
2answers
20 views

Angular directive failing silently (directive rendered too soon?)

I have an Angular app with a custom element directive (<uber-table>). <uber-table> is supposed to take a collection of objects, render them into a <table> and add some functionality ...
0
votes
0answers
20 views

AngularJS select transcluded elementes in directive controller

Making a custom select element with divs and UL's, I will describe the problem after the code: directives.js directive('selectMe', function() { return { restrict: 'E', ...
0
votes
0answers
18 views

angularjs directive accessing original nested elements

Pretty basic scenario, just not sure how to approach it I have an angular app, I have an element restricted directive that uses a templateUrl to bring in a partial. The partial works fine and looks ...
1
vote
2answers
40 views

Dynamic tag with angularjs directive

I would like to create an element directive in angularjs that produces an html element from a json blob passed as an attribute. I have tried quite a few variations of the following... ...
0
votes
1answer
28 views

Angularjs being prominent over jquery and jquey code not working

I am using angular js ng-show ,ng-hide for a control and also am using show(), hide() in javascript at different situations.But only the ng-show and ng-hide is working and not allwing Jquery show() ...
1
vote
2answers
26 views

Cascading angular directives

I have the following Angular binding setup: <div ng-repeat="app in vm.Apps"> <div ng-style="{ background: app.bgColour }"> <p app-shadow="large"></p> ...
0
votes
0answers
16 views

Linking and controller function of directive which is represented as an attribute of another directive don't work

Have the following problem. I want to make two directives. One of them will be an attribute for another. Something like this. <html> <title>Directives</title> <head lang="en"> ...
0
votes
2answers
24 views

AngularJS: Refactoring a confirmation modal directive

I need some advice on refactoring a modal directive I have. I am just getting started with directives, so any other approach to my problem is welcome. My program needs a confirmation modal, where we ...
3
votes
1answer
68 views

angular.js directive templateUrl fails to bind scope

I'm creating a directive that will display and show content by listening to the $routeChangeError event on $rootScope. I got it all to work by inlining the template like this: app.directive("alert", ...
1
vote
3answers
36 views

Why is this Angular model not completely overwritten?

I'm encountering a strange issue where a model is not completely overwritten after a new property has been set on it in a directive. HTML: <div ng-app="app"> <div ...
0
votes
1answer
14 views

Angular ui-router's ui-sref created dynamically in a directive?

I am working on a line of business application that is using Angular to create a SPA around a Node.js api server. I decided on using ui-router cause of the state-machine and their intuitive way of ...
0
votes
1answer
26 views

How to refresh controller from a directive?

Here is the demo : http://plnkr.co/edit/atZZXM6YVYQL0SilpWxq?p=preview In a table, I display each value of my collection, everything is fine. But when I remove one element in the list, the controller ...
0
votes
2answers
20 views

Modal popup in Angular JS without Bootstrap CSS

I'm looking for a plugin for a modal directive in Angular but there is a requirement not to use the Bootstrap CSS. Angular-UI looks nice but obviously depends on Bootstrap. Any pointers?
0
votes
1answer
17 views

Select Last HTML Select element from multiple select elements using AngularJs

Hello guys I am working on an application where I am using django-tastypie as backend and AngularJs for front end.I am totally new to AngularJs. In my template there may be multiple HTML tags based ...
0
votes
0answers
23 views

AngularJS Directive: Mimic ng-src behavior?

I'm integrating a media player in my app using the "Video For Everybody" generator. As the player features a fallback to flash if the browser doesn't support HTML5 video and audio I have to build ...
0
votes
2answers
29 views

Calculate mathematical expression within string in angularJS

How do I evaluate the mathematical expression within a string and assign it to a numerical value in angularJS? Eg: var value = 10; var someValue = "Math.min(value * 0.22, 106800)". I need someValue ...
0
votes
1answer
27 views

Angularjs creating questionaire that allows ranking choices

I'm creating a questionaire for users that allow them to choose and rank personality attributes that best match them. There are three choices in each row and everytime they click on a choice it ...
0
votes
1answer
32 views

How do I check whether an expression attribute has been provided to a directive?

I've created a directive that accepts a callback as an attribute, e.g: <my-directive callback-expression="someFunction()"> </my-directive> The directive is reusable and hence I've given ...
1
vote
1answer
29 views

Recursive menu directive

I'm trying to do a recursive menu with angularJS, but I keep getting the fallowing error: Maximum call stack size exceeded My directives: angular.module("application").directive("navigation", ...
1
vote
1answer
62 views

Recursion using Angularjs and Append Elemnts to an HTML Template

I am quite new to Angularjs . I am working on an app which use Angularjs for front end and django-tastypie for back end. What I am doing is i have a topics list where topics are nested in each others ...
0
votes
1answer
21 views

Applying math rules (like rnd, max etc) to value entered by user using AngularJS directive

I have sum calculation rules defined as below, where 2013 represents the year and 5 and 6 are some codes sent over to the program: app.run(function($rootScope) { $rootScope.MATHRULES = { ...
0
votes
2answers
16 views

Why does changes to the outer scope from within a directive require scope.$apply() even if I am setting scope option to false?

Lately I've noticed that changed to some angular - provider objects, or to my own - outer scope(out side of the directive, in the controllers) required wrapping the code in scope.apply(). can anyone ...
0
votes
0answers
21 views

Angularjs : Using a directive from within another directive's link function

In short, my question is how do I use a directive from inside another directive's link function? Lets say I have a directive notification, whose main job is converting JSON data into a more ...
0
votes
1answer
20 views

Is the compile method appropriate for altering the template dynamically in a directive?

I have a directive where I want to add a select and either a textarea or an input field depending on some input. For example app.directive('monkey', function() { return { restrict: 'E', ...
2
votes
0answers
36 views

Access a div color-picker element through form controller

I am using this library in order to add a color picker feature to my AngularJS app. I would like to allow my client to use a color, which will then appear before him as small square div, with rounded ...

15 30 50 per page