Category Archives: AngularJS

An Introduction To Unit Testing In AngularJS Applications

[Fuente:An Introduction To Unit Testing In AngularJS Applications] An Introduction To Unit Testing In AngularJS Applications AngularJS has grown to become one of the most popular single-page application frameworks. Developed by a dedicated team at Google, the outcome is substantial and widely used in both community and industry projects. One of the reasons for AngularJS’ […]

AngularJS: Directive resolve dependencies

If we want to wait for some server data for directive loading this is the pattern: angular.module(‘busuuApp.translations’) .directive(‘trs’, [‘trs’,’$http’, ‘$q’, ‘wordbee’, function(trs,$http, $q,wordbee,wordbeeStrings) { ‘use strict’; var translateArgs = function(str) { try { if (str[0] != ‘”‘ && str[0] != “‘”) { return, str); } else { // Strips the ” or ‘ on […]

AngularJS UI router

[Fuente:] The de-facto solution to flexible routing with nested views AngularUI Router is a routing framework for AngularJS, which allows you to organize the parts of your interface into a state machine. Unlike the $route service in the Angular ngRoute module, which is organized around URL routes, UI-Router is organized around states, which may optionally have routes, as well as […]

AngularJS : E2E Testing : Protractor

[Fuente:] Protractor  Protractor is an end-to-end test framework for AngularJS applications. Protractor is a Node.js program built on top of WebDriverJS. Protractor runs tests against your application running in a real browser, interacting with it as a user would. Test Like a User Protractor is built on top of WebDriverJS, which uses native events and browser-specific drivers to interact with […]

AngularJS : Buenas practicas

[Fuente:] Single Responsability Cada componente de angular en su fichero Immediately Invoked Function Expression (IIFE) Envolver los componentes de angular con bloques de Javascript Esto elimina los efectos de ir dejando muchas declaraciones globales que pueden entrar en conflicto /** * recommended * * no globals are left behind */ // logger.js (function() { […]

Angular JS Egghead Videos Aprendis

“The dot” Si dejamos ng-app=”” (vacío) podemos tener un comportamiento de data-binding inesperado.Por ejemplo no será lo mismo {{pepe.message}} que {{message}} cuando tengo varios controllers y data binding fuera de controllers. Esto se produce porque hay un parent scope y se producen efectos colaterales Sharing data between controllers Se hace creando un factory y metiendo […]

AngularJS: Dependency injection

[Fuente:] Dependency Injection Dependency Injection (DI) is a software design pattern that deals with how components get hold of their dependencies. The Angular injector subsystem is in charge of creating components, resolving their dependencies, and providing them to other components as requested. For in-depth discussion about DI, see Dependency Injection at Wikipedia, Inversion of Control by Martin Fowler, […]

Autenticación en Single Page Applications With Angular.js

[Fuente:] I have been working a lot with Angular.js lately, and love how easy it makes it to create web applications with rich client-side functionality. It’s an extremely useful asset in keeping your own client-side code lean, making it easy to separate business logic and declarative markup for anything view specific. However, it’s not […]

Angular UI Bootstrap

[Fuente:] Getting started Dependencies This repository contains a set of native AngularJS directives based on Bootstrap’s markup and CSS. As a result no dependency on jQuery or Bootstrap’s JavaScript is required. The only required dependencies are: AngularJS (minimal version 1.0.8) Bootstrap CSS (tested with version 3.0.3). This version of the library (0.10.0) works only with Bootstrap CSS in version 3.x. […]