Angular-xeditable :: Edit in place for AngularJS
Angular-xeditable is a bundle of AngularJS directives that allows you to create editable elements.
Such technique is also known as click-to-edit or edit-in-place.
It is based on ideas of x-editable but was written from scratch to use power of angular and support complex forms / editable grids.
Related cards:
What you need to know about Angular SEO
Search engines, such as Google and Bing are engineered to crawl static web pages, not javascript-heavy, client-side apps. This is typical of a search engine which does not render javascript when the search bot is crawling over web pages.
This...
AngularJS: Access the scope for a rendered DOM element
This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop in a hierarchical tree.
Let's say you have this $scope
in your Angular controller:
$scope.tasks = [
{ 'text': 'Task 1' },
{...
Rest-ORM for Angular: Restmod
Restmod creates objects that you can use from within Angular to interact with your RESTful API.
Partially disable animations for Angular 1.4+
If you use Angular 1.4+ together with Angular Animate, all ng-show
, ng-hide
, ng-class
etc. are animated on default.
If you want only some elements to be animated there are 2 possibilities: Either disable animations globally and only run ani...
$setDirty for Angular 1.2
Angular 1.3 offers $setDirty
for your ngModelController. If you are stuck on Angular 1.2, do this:
model.$setViewValue(model.$viewValue)
This turns the model dirty, while keeping its value.
We have an Angular 1 styleguide for CoffeeScript
We will use this for new Angular code.
Consider the guide in "beta". Things will still refine, but the general structure should be final.
Techniques for authentication in AngularJS applications
Article about implementing authentication (current_user
) and authorization (access rights) in AngularJS.
Has an surprising amount of practical and understandable code.
"controller as" syntax for AngularJS 1.2+
In the Controller:
// Instead of doing this:
app.controller('TodoCtrl', function ($scope) {
$scope.input = 'ex. buy milk';
});
// Do this:
app.controller('TodoCtrl', function () {
this.input = 'ex. buy milk';
});
In the HTML:
<...
How to create giant memory leaks in AngularJS (and other client-side JavaScript)
This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process crashes on your users.
Although this guide has been written for Angular 1 originally, most of the advice is relevant...
Jasmine: Mocking API requests in an Angular service spec
Situation: You want to write a spec for a function inside an Angular service. This function at some point makes an API request and acts upon response. Notably, your Angular app employs uiRouter, although it is not used nor actually required for th...