Mastering Web Application
Securing Your Application Showing a login form We need to allow the user to login to the application. The login form provides th ...
Chapter 7 'LoginFormController') .then(onLoginDialogClose); } } function closeLoginDialog(success) { if (loginDialog) { loginDia ...
Securing Your Application Our navigation menu has a set of ng-show directives on the elements that check whether the current use ...
Chapter 7 </li> <li ng-hide="isAuthenticated()"> <form class="navbar-form"> <button class="btn" ng-click="l ...
Securing Your Application Instead, we will intercept the responses of unauthorized requests to the server, before they get back ...
Chapter 7 if ( response.headers()['content-type'] == "text/plain") { response.data = $sanitize(response.data); }; return respons ...
Securing Your Application function($injector, queue) { return function(promise) { var $http = $injector.get('$http'); return pro ...
Chapter 7 Creating the securityRetryQueue service The securityRetryQueue service provides a place to store all those items that ...
Securing Your Application Notifying the security service The last piece in the puzzle is how to notify the security service, whe ...
Chapter 7 This is not a security feature. It is really just a way to help users to authenticate correctly, if they navigate dire ...
Securing Your Application requireAdminUser); } }); } Now, if a non-admin user attempts to access a route, which has this method ...
Chapter 7 To prevent us from having to repeat ourselves, we can actually put this array into the provider for the authorization ...
Securing Your Application Summary In this chapter, we have looked at some common security issues in rich client web applications ...
Building Your Own Directives While you can get a long way using just controllers and the built-in directives that come with Angu ...
Building Your Own Directives What are AngularJS directives? Directives are, arguably, the most powerful feature of AngularJS. Th ...
Chapter 8 What is great is that the built-in directives are defined using the same directive API that we can use in our own appl ...
Building Your Own Directives At the linking stage, the scope is being attached to the directive, and the linking function can th ...
Chapter 8 Writing unit tests for directives Directives have low level access to the DOM and can be complex. This makes them pron ...
Building Your Own Directives Load the module that contains the directive into the test, then create an element containing this d ...
Chapter 8 This table describes all the fields that can be used in a directive definition: Field Description name The name of the ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf