Mastering Web Application
Angular Zen Hierarchy of scopes and the eventing system Scopes organized in a hierarchy can be used as an event bus. AngularJS a ...
Chapter 1 While AngularJS event system is modeled after the DOM one, both event propagation systems are totally independent and ...
Angular Zen In reality, AngularJS has even more intimate connections to HTML and the DOM as it depends on a browser to parse the ...
Chapter 1 The preceding requirements are not particularly challenging and describe a fairly standard text form. Nevertheless, th ...
Angular Zen We can see a recurring pattern here. To manipulate UI, we only need to touch a small part of a template and describe ...
Chapter 1 The declarative style of programming is usually more expressive as it frees developers from giving very precise, low-l ...
Angular Zen Modules and dependency injection Vigilant readers have probably noticed that all the examples presented so far were ...
Chapter 1 Globally-defined controller's constructor functions are only good for quick-code examples and fast prototyping. Never ...
Angular Zen The idea of being able to declaratively express dependencies is a very powerful one; it frees objects from having to ...
Chapter 1 The preceding code is tightly coupled to one implementation of an archive (NotificationsArchive), since this particula ...
Angular Zen Any service managed by AngularJS' DI mechanism needs to have a unique name (for example, notificationsArchive in the ...
Chapter 1 Factories The factory method is another way of registering recipes for objects creation. It is more flexible as compar ...
Angular Zen Ideally, we would like to have our NotificationsService service to be provided with a configuration value in the fol ...
Chapter 1 }, // other methods go here }; } }; }); Firstly a provider is a function that must return an object containing the $ge ...
Angular Zen The run phase The run phase allows us to register any work that should be executed upon the application's bootstrap. ...
Chapter 1 Modules depending on other modules Not only does AngularJS do the excellent job of managing object dependencies, but i ...
Angular Zen } }); angular.module('engines', []) .factory('dieselEngine', function () { return { type: 'diesel' }; }); Here the c ...
Chapter 1 Since AngularJS combines all the services from all the modules into one big, application-level set of services there c ...
Angular Zen Why use AngularJS modules The fact that AngularJS combines all the services from all the modules into one applicatio ...
Chapter 1 Declarative approach to the UI results in a very concise and expressive way The excellent UI templating machinery doe ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf