Getting Started: Authentication using JavaScript

This example does not use AngularJS or/and ADAL. There is no UI. The functions need to be run from the console and the access token extracted from the URL. A Azure active directory application was create to provide the client id. It works like:

Construct a URL that take the user to a log-in screen
Once the user log in an access token is returned in the URL
That access token is extracted and used in the REST request to get the SharePoint Online resources
(Interestingly you are calling cross domain and not using SP.RequestExecutor)

VSO project JavaScript Auth

Authentication to SharePonit Online using AngularJS and ADAL.js

This project demo how to user AngularJS and ADAL.js to authenticate and read date from a SharePoint Online list. An Azure active directory application was create first, and then and empty ASP.Net web application was created via Visual Studio 2015 community. Project can be found here: ADAL.js and AngularJS