angularjs-directive

how to edit column in value in angular js?

你离开我真会死。 提交于 2019-12-24 01:19:31
问题 I am using UI-grid in my example .I saw the documentation from here of edit row . http://ui-grid.info/docs/#/tutorial/205_row_editable In given example user able to edit the columns present in row.I also make same example also include modules but not able to edit my columns ..what is procedure to edit the columns ? here is my code http://plnkr.co/edit/zypDrZeJUx9ZoTHNnMxc?p=preview already added the modules angular.module('app',['ngTouch', 'ui.grid', 'ui.grid.selection' ,'ui.grid.edit', 'ui

Angular Directive to component angular 1.5

做~自己de王妃 提交于 2019-12-24 01:09:06
问题 I have this directive, that i would like to make a component angular.module('app') .directive('year', function () { var controller = ['$scope', function ($scope) { $scope.setYear = function (val) { $scope.selectedyear = val; } }]; return { restrict: 'E', controller: controller, templateUrl: "views/year.html" }; }); This is what I got so far: angular.module('app') .component('year', { restrict: 'E', controller: controller, templateUrl: "views/year.html" }); I am not sure how to move my var

Nesting angularjs directives recursively

隐身守侯 提交于 2019-12-24 00:59:44
问题 I am having a problem in my application where I would like to have a directive, and inside its template it should conditionally decide whether to recursively render that same directive within it. I have tried to recreate it, and this example is also not working. The directive is not rendered and without errors. I could have made a different mistake in it however. https://plnkr.co/edit/PhDvLZyWvyFThg57qZDV?p=preview index.html <!DOCTYPE html> <html> <head> <script data-require="angularjs@1.5.0

AngularJS: Alerts not showing up

╄→гoц情女王★ 提交于 2019-12-24 00:52:37
问题 I am using Angular Strap for Bootstrap components and trying to show up the alerts Here is the plunker - http://plunker.co/edit/DFBs3hTobHDs36QdqPte?p=preview It does not shows up the alerts, what is that I am missing? 回答1: I have got the plunker working http://plunker.co/edit/DFBs3hTobHDs36QdqPte?p=preview The codebase says it can accept timeout parameter, but I do not know yet how to use it https://github.com/mgcrea/angular-strap/blob/master/src/directives/alert.js#L5 回答2: A better way I

Custom ng-enter directive not passing $event from html to the controller

北城余情 提交于 2019-12-24 00:34:46
问题 I am using a custom directive that detects when the user presses enter and then calls the same function that is called in the ngSubmit of the surrounding form element. Below is a demonstration of my problem, I need access to the event from within the controller but it is always undefined. Has anyone had this issue before? What is the issue? Why is it happening? links to refs are just as good as explanations. Is there a better way then duplicating the method call twice? (secondary) var app =

Angular DatePicker - Multiple directives > [datepicker, datepicker]

情到浓时终转凉″ 提交于 2019-12-23 22:22:34
问题 I'm trying to use the 720Kb datepicker. https://github.com/720kb/angular-datepicker While using the simple example : <datepicker> <input ng-model="date" type="text"/> </datepicker> I'm getting the blow error: angular.js:11655 Error: [$compile:multidir] Multiple directives [datepicker, datepicker] asking for new/isolated scope on: http://errors.angularjs.org/1.3.15/$compile/multidir?p0=datepicker&p1=datep…epicker%20class%3D%22datepicker%22%20date-format%3D%22dd%2FMM%2Fyyyy%22%3E at angular.js

Capturing click events on clusters with markercluster and angular-leaflet-directive

谁都会走 提交于 2019-12-23 21:32:12
问题 I'm playing with the angular-leaflet-directive, and getting the marker names from a mouse click is straight forward. I just listen for the leafletDirectiveMarker.click event and then access args.markerName . angular-leaflet-directive also works with markercluster, so I can cluster markers that have the same coordinates or ones that are close by. However, I would like to do the following, but it is not clear from the documentation on how to do it: Make user double-click on cluster to zoom in .

ngModel.$parsers ingore whitespace at the end of ng-model value

…衆ロ難τιáo~ 提交于 2019-12-23 21:04:08
问题 I have directive like this: .directive('noWhitespace', ['$parse', function($parse) { return { restrict: 'A', require: 'ngModel', link: function (scope, element, attrs, ngModel) { /* scope.$watch(attrs.ngModel, function(value) { var getter = $parse(value); update(getter(scope)); }); */ function update(viewValue) { console.log(JSON.stringify(viewValue)); if (viewValue.match(/\s/)) { ngModel.$setValidity('whitespace', false); return undefined; } else { ngModel.$setValidity('whitespace', true);

Dynamic template in directive based on attributes?

和自甴很熟 提交于 2019-12-23 19:56:39
问题 Ive seen a bunch of questions pretty similar to this, but I'm new to Angular so they aren't quite making sense. Here's my sitaution: I have a directive defined: robus.directive("titlebar", function() { return { restrict: "E", scope: { title: '@title' }, template: "<header class='bar-title'><h1 class='title'>{{title}}</h1></header>", replace: true } }); I use this directive like this: <titlebar title="{{workout.name}}"></titlebar> Ideally, I want to add optional attributes into this, like:

Angular js seperation to different modules in different js files [closed]

瘦欲@ 提交于 2019-12-23 19:23:47
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I created an angular web application that enables drag and drop elements. I finish building it, but i have one big module. The module is placed in one js file with thousand of code lines. I would like to know how can i separate my big modules to several modules in several js files that communicate with each