John Papa - 10 AngularJS Patterns - Code on the Beach 2014
Why Stack Overflow recommends it
Stack Overflow users link it when answering AngularJS questions about controller style, exception handling and code organization, treating Papa's conventions as sound guidance.
Recommended by 3 people across 3 different months, 2015 to 2015.
What it is
A conference talk by John Papa from Code on the Beach 2014 covering ten patterns for structuring real-world AngularJS (1.x) applications. Topics include managing multiple screens, organizing code, CRUD, validation, local storage, unit testing and automated builds.
What people said
Recommends GregL · 2015-03 · Stack Overflow · on “AngularJS - Click on object, access it's ID & fire a function with that ID as parameter”
One thing I saw in this talk [this video] this morning might also be helpful: remember that controller functions are like constructors. They are called with `new` to instantiate a new instance every time they are used. So even though you reused the controller, it wasn't the same instance on both pages. This is different to Angular services, which are singletons and only the one instance is present for the whole application.
Recommends GregL · 2015-03 · Stack Overflow · on “AngularJS - How can I know when a promise on a parent controller has been resolved?”
Tip: Anonymous functions for controllers are not helpful for debugging and code cleanliness. See this talk [this video] by John Papa for more details.
Recommends Bharat Bhushan · 2015-04 · Stack Overflow · on “Building applications with angularjs”
Its seems you don't want to do google. BTW I faced the same problem you are facing now. I did google for the same and finally i reached on scotch.io and bennadel.com that helps me a lot. Hope these are also helpfull for you. scotch.io [LINK] Bannadel [LINK] Thinking in angularjs [LINK] Learn angularjs free [LINK] 10 angular js patterns [this video] How data binding works in angular js [LINK]
Recommends APassanisi · 2015-07 · Stack Overflow · on “Calling a function using ng-submit with 'ControllerAs' syntax”
I'm not sure what the norm is in angular. I've seen so many different ways of doing everything, it gets tough when you're looking up tutorials or through other people's code and everyone does it slightly different. I just saw a talk by the guy here [this video] and went with his suggestions because its very consistent and follows a lot of good basic JavaScript habits, and doesn't give a suggestion without a reason. And yeah, I've been using vm on every controller.
Cites Radek Anuszewski · 2015-11 · Stack Overflow · on “Angular - circular dependency injector whie trying inject $modal to exception handler decorator”
Due to John Papa - 10 AngularJS Patterns presentation [this video] advices I try to implement additional functionality to exception handling: exceptionHandlerDecorator.$inject = ['$provide']; function exceptionHandlerDecorator($provide){ $provide.decorator('$exceptionHandler', handleException); } handleException.$inject = ['$delegate', 'ExceptionHandlerService']; function handleException($delegate, ExceptionHandlerService){ function handle(exception, cause){ $delegate(exception, cause); ExceptionHandlerService.handle(exception.message); } return handle; } ExceptionHandlerService.$inject = ['$modal']; function ExceptionHandlerService($modal){ //do things } But when I try ti inject $modal to Except