Angular JS resizable div directive

This question is old, but for anybody looking for a solution, I built a simple directive to handle this, for vertical and horizontal resizers. Take a look at the Plunker angular.module(‘mc.resizer’, []).directive(‘resizer’, function($document) { return function($scope, $element, $attrs) { $element.on(‘mousedown’, function(event) { event.preventDefault(); $document.on(‘mousemove’, mousemove); $document.on(‘mouseup’, mouseup); }); function mousemove(event) { if ($attrs.resizer == ‘vertical’) … Read more

Angularjs autocomplete from $http

I made an autocomplete directive and uploaded it to GitHub. It should also be able to handle data from an HTTP-Request. Here’s the demo: http://justgoscha.github.io/allmighty-autocomplete/ And here the documentation and repository: https://github.com/JustGoscha/allmighty-autocomplete So basically you have to return a promise when you want to get data from an HTTP request, that gets resolved when the … Read more

Getting “type or namespace name could not be found” but everything seems ok?

This can be the result of a .Net framework version incompatibility between two projects. It can happen in two ways: a client profile project referencing a full framework project; or an older framework version targeting a newer framework version For example it will happen when an application is set to target the .Net 4 Client … Read more

Update Angular model after setting input value with jQuery

ngModel listens for “input” event, so to “fix” your code you’d need to trigger that event after setting the value: $(‘button’).click(function(){ var input = $(‘input’); input.val(‘xxx’); input.trigger(‘input’); // Use for Chrome/Firefox/Edge input.trigger(‘change’); // Use for Chrome/Firefox/Edge + IE11 }); For the explanation of this particular behaviour check out this answer that I gave a while … Read more