Angular Tips

Join us in our way to learning Angular.js

An Introduction to Angular 2

| Comments

DISCLAIMER: Angular 2 is still on a developer preview, so it has a lot of missing features, broken stuff and it is also subject to change.

Ready for Angular 2? You bet!

For this demo, we are going to code an application which requests german words. The word will also come with its translation if the user is authenticated.

First, grab the KOA backend from here, then:

1
2
$ npm install
$ node server.js

A Backend-less Plunker

| Comments

So you are asking for help and someone says… hey plunk it so we can see it.

Right, even when we should be able to reproduce any problem in a small example, there are some difficult ones.

Imagine this conversation:

  • Hey I am creating a todo list but when I try to update a todo it changes and then immediately changes back.
  • Good, can you make a plunker for that?
  • Uhm no, it uses my (insert here a backend) and I can’t use it on a plunker.

It is not an uncommon issue at all. What could be a good solution? Swap our service that talks with the backend with a different one swapping the $http calls with fake data? Yeah, we could, but if you start modifying your original implementation, it will be harder to debug, because the problem could lie on that original service and it is not there to test.

Working With Laravel + Angular - Part 2

| Comments

Last time we saw a couple of different options on how to integrate Angular and Laravel. Today we are going to learn how to create our backend and frontend as separate applications but having them work together under the same domain. Every request will go to angular except the ones for /api which are going to be managed by Laravel.

Working With a Laravel 4 + Angular Application

| Comments

So you decided that Laravel is a great choice for a backend and that Angular is going to fit perfectly as the framework of choice for the frontend. Yeah! That is correct and I am starting to like you.

How to start? So many question, so little time (someone said :P)

My New Angular Workflow With Gulp

| Comments

NOTE: The workflow readme will be always a little more updated than this article.

Here is yet another angular boilerplate opinionated in how I work with Angular. I made it for myself but if you find that my opinions are good for you, feel free to use it and collaborate with issues or pull requests.

Let’s start with the app folder:

App folder

Tip: Accessing Filtered Array Outside Ng-repeat

| Comments

There is a common question I get time to time, so I decided to write about it here.

Let’s say I have an array of people and I filter them on a ng-repeat, then I want to access that filtered result to do something. I can imagine a few different use cases:

  • See how many items matched your search to recalculate your pagination.
  • Change the template based on the number of results you have.
  • Display a message if you got no results.
  • Show the quantity of items returned from your search.
  • Etc.

One Year of Angular-tips!

| Comments

On August 2013 I created this blog, and here we are one year later.

For this year, I expect to bring you more articles so we can learn a lot of new stuff. Also, we will probably see some Angular 2.0 stuff for this year, which is awesome.

In this year, we got 235.388 visits which is quite awesome, thank you all for that.

Back to the present, I have something to show here, but for that, you will have to wait :D. Also I have some good ideas for new articles (I am always open to new ideas too).

So, I want to thank you all for your endless support and feedback.