Luka gave an introduction to AngularJS, an open-source JavaScript framework. Some key points included:
- AngularJS aims to decouple DOM manipulation from application logic for cleaner code.
- Modules allow splitting applications into multiple files without namespace issues.
- Scopes provide isolated contexts for controllers and directives to share data.
- Data binding synchronizes JavaScript models with HTML views.
- Routing maps URLs to templates and controllers.
- Controllers retrieve and manipulate data to populate views.
- Factories provide reusable data services.
- Filters transform output for views.
- Directives create custom elements and attributes.
- Testing ensures correct behavior.
4. ANGULAR'S PHILOSOPHY
Decouple DOM manipulation from app logic
Code reusage
Make common tasks trivial and
difficult tasks possible
Not a library
5. MODULES
Split your application into multiple files
No global namespace manipulation
Doesn't limit you with files structure
6. $SCOPE
One $rootScope
Every controller gets its own scope
and inherits data from parent controller
Every directive gets new $scope
that is isolated from others
15. TESTING
Unit testing
End to end testing
it('should reverse greeting', function() {
expect(binding('greeting|reverse')).toEqual('olleh');
input('greeting').enter('ABC');
expect(binding('greeting|reverse')).toEqual('CBA');
});