AngularJS
46.8K views | +4 today
Follow
 
Scooped by William delmas
onto AngularJS
Scoop.it!

AngularJS: use $timeout, not setTimeout

AngularJS: use $timeout, not setTimeout | AngularJS | Scoop.it

There are some cases where one needs to perform some sort of timeout operation and we frequently achieve this using JavaScript's setTimeout() function.

However, if we use setTimeout() in an AngularJS application we also need to use$scope.$apply() to ensure that any changes to the scope will be reflected elsewhere (i.e. data-bound in a view).

more...
No comment yet.
AngularJS
Ressources about AngularJS, single page application.
Curated by William delmas
Your new post is loading...
Your new post is loading...
Scooped by William delmas
Scoop.it!

Learning AngularJS

Learning AngularJS | AngularJS | Scoop.it

A bunch of links to blog posts, articles, videos, etc for learning AngularJS. This list is in its early stages. Feel free to submit a pull request if you have some links/resources to add. Also, I try to verify that the articles below have some real content (i.e. aren't 2 paragraph blog posts with little information) to ensure I'm not listing "fluff" pieces. If you have an idea for a better way to organize these links, please let me know. As I find similar posts in the "General Topics" section, I will break them out into their own categories.

more...
No comment yet.
Scooped by William delmas
Scoop.it!

Common Misconceptions About Inheritance in JavaScript

Common Misconceptions About Inheritance in JavaScript - JavaScript Scene - Medium

WAT? [wat] — interjection: A sound a programmer makes when something violates the principle of least astonishment by astonishing them with counter-intuitive behavior.
> .1 + .2
0.30000000000000004
> WAT? OMG! STFU! STUPID JAVASCRIPT!!!

Also, WAT? is the sound I make when I talk to many seasoned JavaScript developers who have neglected to learn the basic mechanics of prototypal inheritance: one of the most important innovations in CS history, and one of the Two Pillars of JavaScript.
To me, this is like a professional photographer who has yet to learn the exposure triangle — the basic formula for controlling much of the visual style of a photograph. Put simply:



more...
No comment yet.
Scooped by William delmas
Scoop.it!

DRY dependency injection in Angular with gulp-ng-annotate

DRY dependency injection in Angular with gulp-ng-annotate | AngularJS | Scoop.it

One build tool that I really like is gulp. If you're not familiar with gulp, the cool thing about it is that it uses node's streams as a performant piping mechanism to connect multiple tiny modules that do one thing, and one thing well.

Now back to Angular and the tedious process I explained before. With ng-annotate the inline array annotation becomes unnecessary, even though your code can still be minified.


more...
No comment yet.
Scooped by William delmas
Scoop.it!

Building a Simple Spotify Player with Ionic

Building a Simple Spotify Player with Ionic | AngularJS | Scoop.it

Spotify is a great way to stream all of your loved music. As nearly all great services have a public API today, so has Spotify. In this tutorial I will show you how to login to Spotify, access your playlists, read the track data and also play some music snippets. Everything will be wrapped inside a mobile app using the great Ionic Framework.



more...
No comment yet.
Scooped by William delmas
Scoop.it!

Make a Todo Chrome Extension with AngularJS

Make a Todo Chrome Extension with AngularJS | AngularJS | Scoop.it

Hi there, AngularJS is my favorite javascript framework to build Single Page Application. Work with AngularJS is both fun and challenge. I've work with AngularJS to develop many websites, from  complex CRUB to entertainment websites. Later, I found that AngularJS is also a powerful tool to build Chrome Extension.

Chrome Extension are scripts which extend capabilities of Google Chrome browsers. They are build with HTML, Css, Javascript, after all they are just 

In this tutorial, we will use AngularJS to build this simple Todo Chrome Extension:

more...
No comment yet.
Scooped by William delmas
Scoop.it!

How To Make A HealthKit App With Ionic and ngCordoa

How To Make A HealthKit App With Ionic and ngCordoa | AngularJS | Scoop.it

Since the release of the iOS 8 SDK, developers have access to the HealthKit App and its services. Through this service you can read and write body data like weight, height or store a complete sports workout session. To implement this feature in your Ionic app, you can make use of thengCordova wrapper for cordova plugins, and that’s what I will show you today.

We will make a simple App to write some general data and to submit a complete workout to the Health app, which will then be displayed inside the standard iOS app.



more...
No comment yet.
Scooped by William delmas
Scoop.it!

Testing AngularJS with Protractor and Karma

Testing AngularJS with Protractor and Karma | AngularJS | Scoop.it

Since e2e tests are much more expensive than unit tests - e.g., they generally take more time to run and are harder to write and maintain - you should almost always focus the majority of your testing efforts on unit tests. It’s good to follow the 80/20 rule - 80% of your tests are unit tests, while 20% are e2e tests. That said, this tutorial series breaks this rule since the goal is to educate. Keep this in mind as you write your own tests against your own application.



more...
No comment yet.
Rescooped by William delmas from Angular.js and Google Dart
Scoop.it!

A curated list of angular-js directives.

A curated list of angular-js directives. | AngularJS | Scoop.it

Angular-js.in is a curated repository of the best angular-js directives, modules, services, bootstrap, ui, etc


Via Piyas De
more...
No comment yet.
Scooped by William delmas
Scoop.it!

Comparing Angular 1.x & 2.0

Comparing Angular 1.x & 2.0 | AngularJS | Scoop.it

The Angular team faces a problem. How do you talk the great new features of Angular 2.0 under development without damaging use of the current 1.x? This effect is often called the Obsborne effect, named after a 1980s computer company whose marketing contributed to putting the company out of business. In short, the better 2.0 sounds, the less people will want to start or continue projects built with 1.x.

more...
No comment yet.
Scooped by William delmas
Scoop.it!

A balanced approach between React and AngularJS

A balanced approach between React and AngularJS | AngularJS | Scoop.it

We mostly use AngularJS as our JS framework of choice. We don’t want to enter the current flame war; we simply think it is great. We don’t buy the “it’s too complex” argument - we do software development so we have to understand the tools we use. The AngularJS abstraction and terminology are what they are, but once you wrap your head around that, they make a lot of sense. The depth of the framework is why it is called a framework, it solves a lot of common pain points in an elegant and efficient way. Mostly…

The only argument that we do agree with is that it can be fairly common to get UI performance issues in AngularJS. DOM manipulation is far from being optimal, and watchers trigger DOM rebuilds fairly often. To be fair we have upgraded from Angular 1.2 to 1.3 and it is getting better, but not good enough to get the native touch we are looking for on the most complex pieces.

more...
Navtej Kohli CDC's comment, May 28, 2015 5:59 AM
valuable post
Rescooped by William delmas from JavaScript for Line of Business Applications
Scoop.it!

Testing AngularJS Page with Protractor

Testing AngularJS Page with Protractor | AngularJS | Scoop.it

In this tip, I would like to describe how to perform E2E (End to End) Test using Protractor for an Angular JS page/site.


Via Jan Hesse
more...
No comment yet.
Scooped by William delmas
Scoop.it!

Flattening Promise Chains

Flattening Promise Chains | AngularJS | Scoop.it

Promises are a great solution to address complexities of asynchronous requests and responses. AngularJS provides Promises using services such as $q and $http; other services also use promises, but I will not discuss those here.

Promises allow developers to easily attach 1x-only notifications of response to any asynchronous request/action. Promises also enable two (2) other very important things. We can:

  • Transform the responses before subsequent handlers (in the chain) are notified of the response.
  • Use the response to invoke more async requests (which could generate more promises).

But even more important than the features above, Promises support easy chaining of custom activity or computations. Managing sequences or chains of asynchronous activity can be a very difficult and complex effort. Promise chains are amazing and provide means to easily build sequences of asynchronous requests or asynchronous activity.

more...
No comment yet.
Scooped by William delmas
Scoop.it!

Improving AngularJS long list rendering performance using ReactJS

Improving AngularJS long list rendering performance using ReactJS | AngularJS | Scoop.it

If you're reading this, you most probably tried to make a long and/or complex list of items using a ng-repeat directive, and after seeing how it performs in terms of speed, felt like AngularJS failed you.

more...
No comment yet.
Rescooped by William delmas from JavaScript for Line of Business Applications
Scoop.it!

Build a Better Angular 2 Application with Redux and ngrx

Build a Better Angular 2 Application with Redux and ngrx | AngularJS | Scoop.it

State management within Angular started out as a single celled organism if you will in the form of a single controller managing all the state for the application. If this is a single page application, one controller makes sense right? We emerged out of the ice age by starting to group our views and controllers into smaller, self-contained units either within a directive or a route. This was a vast improvement, but there was still the problem of managing complex state within our applications. It was not uncommon for us to have bits and pieces of state strewn across our application tucked inside of controllers, services, routes, directives, and occasionally, in our templates. Mutable state in itself is not inherently evil but shared mutable state is a recipe for disaster.


Via Jan Hesse
more...
No comment yet.
Scooped by William delmas
Scoop.it!

Migrating directives to Angular 2

Migrating directives to Angular 2 | AngularJS | Scoop.it

Angular 2 it is just around the corner and people are still afraid because Angular 2 changes too much and it will hard to migrate. That is not true at all, in fact you will see how easy is Angular 2by highlighting the semantic shift between those two.

Let’s migrate a directive from Angular 1 to Angular 2. I love accordions, everybody love accordions! Let’s migrate ui-bootstrap accordion to Angular 2. I can’t assume that you’re familiar with it, so we are code both at the same time, explaining the differences along the way. I highly recommend you to, at least, replicate yourself the Angular 2 one.



more...
No comment yet.
Scooped by William delmas
Scoop.it!

Angular 2 Survey Results

Angular 2 Survey Results | AngularJS | Scoop.it

Originally we were only thinking about getting feedback from the small group of developers that are already spending most of their day working on Angular 2. This quickly changed, however, as more and more people started submitting responses. Angular 2 is only in alpha and you cannot build production apps with it yet. It is probably safe to assume that many people who responded are just starting to learn about Angular 2. Therefore, we now view the results in terms of what developers think they will do in the future rather than what they are actually doing right now.

With that disclaimer out of the way, let’s get to the results…

more...
No comment yet.
Rescooped by William delmas from JavaScript for Line of Business Applications
Scoop.it!

Build an Etsy Clone with Angular and Stamplay

Build an Etsy Clone with Angular and Stamplay | AngularJS | Scoop.it
In this three-part tutorial series we’ll be building an Etsy clone with Angular and Stamplay. Stamplay is a great development service that handles much of the server and API based stuff for developers. This means you as a developer can focus on the things that matter most to your users; things like user interface, interactions, […]

Via Jan Hesse
more...
No comment yet.
Scooped by William delmas
Scoop.it!

Making a lock pattern login ionic and AngularJS

Making a lock pattern login ionic and AngularJS | AngularJS | Scoop.it

The starting point for this tutorial is my last tutorial about a simple login with ionic. If you haven’t followed you can get it on my github repo.

First of all you need to download the loginpattern library created by Sudhanshu Yadav from his github repo. Copy the PatternLock js and css file into your ionic project under www/lib/patternLock.

As the lib needs jQuery, you need to install it. Installing things with bower is the most easy way, so go to your command line from the root of your ionic project and run:



more...
No comment yet.
Rescooped by William delmas from JavaScript for Line of Business Applications
Scoop.it!

How To Handle User Authentication With AngularJS

How To Handle User Authentication With AngularJS | AngularJS | Scoop.it

Implementing a login and user authentication system for your AngularJS app seems to be one of the hardest problems people encounter. My article on a simple login with Ionic and AngularJS is the far most viewed article on this blog, every day! As the mentioned article only describes a basic system for a very low level security, this article will highlight everything you need for a complete user authentication and login inside your AngularJS app!



In particular this means, this article will show you how to:

  • Log in a user and store the user session (Token based auth!)
  • Protect your routes based on authentication status and role of the user
  • Notice when an unauthorised request was made and a new login is required

Via Jan Hesse
more...
No comment yet.
Scooped by William delmas
Scoop.it!

AngularJS: Upload Images & Live Demos

AngularJS: Upload Images & Live Demos | AngularJS | Scoop.it

Often developers will publish source code to a custom application or library on GitHub. Experienced developers will also document their code/solution with a detailed README, and perhaps Wiki pages. But those same developers often do not have convenient answers to the following issues:

  • How do you upload images that you want to be shown in the README file(s)?
  • How do you deploy a live demo of your application or library?

The following two sections will show you how to accomplish these easily!

more...
No comment yet.
Rescooped by William delmas from JavaScript for Line of Business Applications
Scoop.it!

Improving AngularJS long list rendering performance using ReactJS

Improving AngularJS long list rendering performance using ReactJS | AngularJS | Scoop.it

In some cases you might be able to avoid this problem by using paging or infinite scrolling, but sometimes that's just not good enough. For example, lists that are displaying only a few items at a time (like any kind of a log) would simply be very impractical from the users point of view. Another reason - you might be using libraries like SlyJS that load a whole list at once to calculate the size of the embedded scrollbar and to make list swiping and elastic bounds work properly. Ooooor - your client simply demands it. :)


Via Jan Hesse
more...
No comment yet.
Scooped by William delmas
Scoop.it!

Token Based Authentication for Single Page Apps

Token Based Authentication for Single Page Apps | AngularJS | Scoop.it

Single page apps make a lot of sense for customer-centric applications that handle a lot of user data. SPAs are often tied to a RESTful API for a good reason: when your data makes sense, your experience makes sense. We just rebuilt our console – an Angularjs-based Single Page App – and spent a lot of time modeling out the REST API (the actual data model/structures).

With the user model mapped out, it’s much easier to build a UI for your API because the common things like list views, search boxes, sorting, etc – they just fall in place alongside your data model. Fronting a REST API with a single page app gives the assurance of sane data and the freedom to make your UI look and feel sexy. #winning

more...
No comment yet.
Rescooped by William delmas from Angular.js and Google Dart
Scoop.it!

Coming to React from AngularJs

Coming to React from AngularJs | AngularJS | Scoop.it

I've been an Angular guy for the past couple years, and I've gotten pretty good at it. I've seen its nooks and crannies, and I've grown fond of it.

But, like I said, it was hard to ignore React.

It's fast, it's light, it's new and shiny. So I dug in. I recently released an app, Farely, which I'd written in Angular. (Note: I didn't use directives like I should have.) I thought it'd be the perfect opportunity to try out React, since the app could be composed of components. It also wouldn't need anything React doesn't offer, like routing or complex data modeling.

And so I began the project. Below are my thoughts and observations, should they help inform your library choices. I'll assume you've been introduced to React and Angular, since there are great articles written about them elsewhere.


Via Jan Hesse, Piyas De
more...
No comment yet.
Rescooped by William delmas from Angular.js and Google Dart
Scoop.it!

Fixing Memory Leaks in AngularJS and other JavaScript Applications

Fixing Memory Leaks in AngularJS and other JavaScript Applications | AngularJS | Scoop.it

Dealing with memory leaks in JavaScript applications can be a complex process. In this article I'm going to show you how to identify whether you have memory leaks, analyse them and ultimately resolve them.

I'm using an AngularJS application to demonstrate the concepts and approaches, but much of this material applies to any JavaScript application.

 

Contents:

Understanding Memory Leaks What is a Memory Leak? Why is a Memory Leak Bad?Identifying Memory Leaks Method 1: The Wrong Way Method 2: The Timeline Method 3: Recording Heap Allocations Method 4: Heap SnapshotsAnalysing Memory Leaks Analysing the leak in Scenario 2 More on GraphsFixing Memory Leaks Three golden rules Anti-patterns to avoidThe Future Weak Maps AngularJS 2 Even Better BrowsersAppendices Thanks Mysteries Futher Reading


Via Jan Hesse, Piyas De
more...
Rick's curator insight, July 17, 2015 9:45 AM

Resolving memory leaks can dramatically increase the performance of your application.

Rescooped by William delmas from JavaScript for Line of Business Applications
Scoop.it!

Creating a Web App From Scratch Using AngularJS and Firebase

Creating a Web App From Scratch Using AngularJS and Firebase | AngularJS | Scoop.it

In this series, we'll be using AngularJS and Firebase to create a simple web application from scratch. It will be a simple blogging application where the user can sign in or sign up and publish a blog post.

This tutorial assumes you have basic knowledge of AngularJS, but it shouldn't be tough to pick up the topics along the way.


Via Jan Hesse
more...
No comment yet.
Scooped by William delmas
Scoop.it!

React JS Injection into Angular JS Application or Fighting for Performance Increase

React JS Injection into Angular JS Application or Fighting for Performance Increase | AngularJS | Scoop.it
React JS Injection into Angular JS Application or Fighting for Performance Increase; Author: EastBancTech; Updated: 15 Aug 2014; Section: Client side scripting; Chapter: Web Development; Updated: 15 Aug 2014
more...
No comment yet.