John | John Papa

John Papa

Evangelist on the loose

Angular Style Guide

5 comments

I just published the first draft of my opinionated style guide for syntax, conventions, and structuring AngularJS applications. You’ll find many of these and more explained in deeper detail in my Pluralsight course AngularJS: Clean Code (coming in August 2014). The styles contained here are based on on my experience with AngularJS, presentations, Pluralsight training courses and working in teams. I will keep this guide updated on github. Usage and Purpose I get asked a lot for style guides, how to get started once you learn the AngularJS basics, and what I recommend. This guide helps point in that direction […]

AngularJS’s Controller As and the vm Variable

22 comments

The great thing about coding is that we are able to mix coding style and personal/team preference together. This post is all about a preference of mine that has helped me stick to be principles of readable, efficient, and maintainable code with AngularJS. It’s no secret that I am a fan of the “Controller As” syntax that was revealed in AngularJS 1.2.0, in fact I wrote an entire post about the Controller As feature. I’m also a fan of readable code and keeping things consistent and simple. We tend to spend a lot of time reading code. In fact, I […]

Easy Fix to a Common Angular Module Error

7 comments

I love running my code right after making some new changes, so I can see them light up in the browser. But I don’t love when error messages are not straight forward. At least not to me. Recently I ran a project and was told ngLocale is not available! What? I’m not loading ngLocale, what does Angular want from me? After some digging in the console and Chrome debugger I uncovered more information about the issue. “[$injector:nomod] Module ‘ngLocale’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you […]

10 Angular Tips from TechEd 2014

9 comments

Getting started with AngularJS is smooth sailing. But once you master the basics, you begin to realize there are things you wish you knew before you started. This session shares 10 such tips that go beyond the fundamentals. You can find the deck below and all demos (plus a few bonus demos) right here. Or watch the video now right here or at the source. I demonstrate how I build end-to-end apps using AngularJS and BreezeJS on the ASP.NET platform. We explore how to manage multiple screens, maintain clean code with popular patterns, implement CRUD, perform robust HTML validation, and […]

Toastr 2.0.2 Now Available on NuGet, Bower and CDNJS

Toastr 2.0.2 is now available on Bower, NuGet and CDNJS! We’re thrilled that toastr has been so helpful to many of you as it now has almost 150,000 downloads on NuGet and 1600+ stars on github! This release has several minor bug fixes and some new features. For details you can check out the changelog. Of course there are new unit tests for all of these too. Get Toastr Toastr on GitHub Toastr on NuGet using install-package toastr Toastr on Bower Toastr on CDNJS Learning Toastr The Toastr demo page is also updated to help demonstrate the features. New Features […]

Gulp and Grunt at AngleBrackets

4 comments

I love JavaScript and task automation is a key ingredient to building awesome browser based apps. Today I presented how I prefer to do task automation using gulp.js and contrasted it to grunt.js at AngleBrackets, a newer web conference. I’ll be blogging more about these and putting a course out, but for now here are the slides from the conference and you can find the grunt and gulp demos here.

New Breeze Angular Service

27 comments

The world of JavaScript changes at a fast pace and in the time since my Angular and Breeze Part 1 and Angular and Breeze Part 2 Pluralsight courses have been released, both libraries have had some revisions. One such revision is worth making some changes in your code. The good news is that the folks at Angular and Breeze made it easier on us all. This post explains the changes and how you can refactor your code quickly to work with the latest Angular and Breeze libraries. Short Version With HotTowel.Angular.Breeze 2.1.0 (and prior), we used to need these 3 […]

Immerse Yourself in Angular, MEAN, ASP.NET, and Gulp

Let’s go to ludicrous speed! The Web is evolving at such an amazing pace that it’s difficult to keep up with everything that is around us. When you have precious little time, how do you know what to focus on? One great way is to come to AngleBrackets! Next month (April 13-16) I will be joined by my friends Dan Wahlin and Ward Bell to present some awesome sessions at AngleBrackets in Orlando. Dan and I will be presenting a full day workshop on Angular, then I’ll also be presenting or co-presenting these sessions: AngularJS in 60 Minutes-ish Big Gulp! […]

Angular App Structuring Guidelines

36 comments

App Structure I find it extremely helpful to have an idea of what is important to me and my team in structuring my app instead of focusing on the actual structure. You have to find your own path that is comfortable for you and your team. Instead of just picking a structure, it’s helpful to think about the “why”, so I’ll walk you through the guidelines I follow and my thought process on why I choose how I do. This is a follow up to my post on Angular Structure. How you organize your structure is up to you. There […]

Angular and Progressive Saving

3 comments

Last week I had the privilege of presenting at ngConf which was jam packed with some awesome presentations. My presentation was on Progressive Saving with Angular, where you can stash work in progress in local storage and come back to it. It was an abbreviated version of what I present in my Pluralsight course Building Apps with Angular and Breeze Part 1 and Part 2, where I explore this concept in detail. You can watch my presentation here. Here are the slides from my presentation. And you can run the live demo of the app from this link. The conference […]