Tag: angularjs-directive
Posts of Tag: angularjs-directive
  1. angularjs directive - element.html() breaks transclusion

    Reference plunker If I call element.html() in my link function, the transcluded elements no longer compile. That really says it all, and the plunker will demonstrate, but here's the code: Directive: app.direct...Learn More
    AngularJSangularjs-directive
  2. Directive compile function, adds html but then gets overwritten

    I have an directive. I want it to read configuration options from a table head then build out the tbody tr with angular expressions (ng-repeat) at the compile stage. I have debugged and can get to a stage where...Learn More
    AngularJSangularjs-directive
  3. element.find does not work for nested elements inside ng-switch

    I have a directive that contains an ng-switch DOM element. I need to bind an event to a DOM node under the ng-switch, but for some reason element.find does not return any nodes under the switch element! In the...Learn More
    JavaScriptjQueryAngularJSangularjs-directive
  4. The attributes passed to directive in angularjs change only into directive scope but not outside

    I want use the directive to customize my code. i have followed button that responsible to switch isCollapsedUpload flag defined in controller as: @scope.isCollapsedUpload=false. When user press on button, the i...Learn More
    AngularJSangularjs-directive
  5. AngularJs - Directive events and dom rendering

    In the code below, I am trying to use a template (with {{ value }} substitution) but I have been trying for two days to find a way of getting to the rendered code to set some properties on it. I cannot use the ...Learn More
    AngularJSangularjs-scopeangularjs-directive
  6. Is it possible to 'watch' attributes' changes

    Is it possible to "watch" for ui changes on the directive? something like that: .directive('vValidation', function() { return function(scope, element, attrs) { element.$watch(function() { ...Learn More
    AngularJSangularjs-directive
  7. Data-binding in a directive template

    I'm trying to build a really basic Angular directive that generates a "div" that can have two states: "on" and "off". I've naively come up with an implementation that you can find here: http://jsfiddle.net/wSz2...Learn More
    AngularJSangularjs-directive
  8. 2 way binding directive with a popover/clickover

    I am really enjoying the Angular experience, but have hit the following stumbling block. I am trying to get 2 way binding working with a popover/clickover widget in angular, but am experiencing several issues -...Learn More
    JavaScriptAngularJSangularjs-directive
  9. Why isn't scope.$watch working?

    Please see this Fiddle: http://jsfiddle.net/sDnN5/ scope.$watch('points', function (value) { scope.console.push('scope.$watch'); }); for some reason this is not firing when $scope.points change $scope.poin...Learn More
    AngularJSangularjs-directive
  10. Angular taking DOM snapshot

    I am trying to record the content of a div which is populated using ng-repeat, sort of like taking a snapshot of that div at certain moments so that I don't have to write more code to persist data. link: functi...Learn More
    AngularJSdependency-injectioncloneangularjs-directive
  11. Adding a directive to an existing element

    I am attemping to add the required directive to an element, at some point in the future. In the example, its if the model field is dirty, then make the element required. I have attempted to just set the require...Learn More
    AngularJSangularjs-directive
  12. Use angularjs to post JSON without a parameter name

    Currently I have a resource like so: return $resource(usersUrl, {}, { //The data model is loaded via a GET request to the app query: {method: 'GET', params: {}, isArray: false}, putupda...Learn More
    JavaScriptAngularJSangularjs-directive