Skip to content
0:00 / 0:00

#angularjs#miskohevery#directives

AngularJS MTV Meetup: Best Practices (2012/12/11)

Angular

167K subscribers • 5 videos on Hallway

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • Presented by Miško Hevery
  • Made by the vendor. The company whose product it covers made or sponsored it.
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

373K views13 years ago1 recommendation

Web developmentVue, Svelte, Angular and others

Miško Hevery discusses design choices, style best practices, and structuring applications in AngularJS.

meetup.com/AngularJS-MTV/events/93943412/ Presentation slides available at: goo.gl/CD0Is Live from the Mountain View, CA meetup, Miško Hevery discusses the advantages and disadvantages of various design choices when structuring an app in AngularJS, and some of the best practices that we use in our own development. Some of the topics we'll cover: - Style best practices that we use in our own projects at Google - Handling different browsers when writing directives (e.g. IE) - Comparisons between different ways of structuring your application: + using controller vs scope + using directive prefix vs namespace + using element name vs attribute name vs class

Why it's here

1 person recommends this

What people say. Recommended for understanding AngularJS application structure and directive testing.

Moments people linked to

ghidenon Stack Overflow • Recommends

On “To test a custom validation angularjs directive”

I figured it out by reading angular-app code https://github.com/angular-app/angular-app This video also helps too link to this video Two mistakes that I made: Do not bind directly to the scope when you are doing ng-model Use form controller to directly manipulate what to pass for directives Here is the updated version. The directive is the same, only the test that I changed. describe('directives', function() { var $scope, form; beforeEach(module('exampleDirective')); beforeEach(inject(function($compile, $rootScope) { $scope = $rootScope; var element = angular.element( '<form name="form">' + '<input ng-model="model.somenum" name="somenum" integer />' + '</form>' ); $scope.model = {…
67View the answer