Angular Experiments

From PeformIQ Upgrade
Jump to navigation Jump to search

Here is another go at implementing a simple Auth0 authenticated app

> ng new Routes
> cd Routes
> npm install font-awesome --save
> npm install auth0-lock --save
> npm install angular-jwt --save
> npm install semantic-ui-css --save
> npm install angular-router --save
> npm start

To add in Auth0 support:

> npm install --save auth0-lock
`-- auth0-lock@10.5.1
  +-- auth0-js@7.3.0
  | +-- Base64@0.1.4
  | +-- json-fallback@0.0.1
  | +-- jsonp@0.0.4
  | +-- reqwest@2.0.5
  | +-- winchan@0.1.4
  | `-- xtend@2.1.2
  |   `-- object-keys@0.4.0
  +-- blueimp-md5@2.3.1
  +-- fbjs@0.3.2
  | +-- core-js@1.2.7
  | +-- loose-envify@1.3.0
  | | `-- js-tokens@2.0.0
  | +-- ua-parser-js@0.7.11
  | `-- whatwg-fetch@0.9.0
  +-- immutable@3.8.1
  +-- jsonp@0.2.0
  | `-- debug@2.1.3
  |   `-- ms@0.7.0
  +-- password-sheriff@1.0.1
  +-- react@15.3.2
  | `-- fbjs@0.8.5
  |   +-- core-js@1.2.7
  |   `-- isomorphic-fetch@2.2.1
  |     +-- node-fetch@1.6.3
  |     | +-- encoding@0.1.12
  |     | `-- is-stream@1.1.0
  |     `-- whatwg-fetch@1.0.0
  +-- react-addons-css-transition-group@15.3.2
  +-- react-dom@15.3.2
  `-- trim@0.0.1

> npm install --save angular2-jwt
`-- angular2-jwt@0.1.25

The module Semantic-UI 'semantic-ui-css' brings in jQuery:

> npm install semantic-ui-css --save
routes@0.0.0 C:\src\Angular\Routes
`-- semantic-ui-css@2.2.4
  `-- jquery@3.1.1

We need to explicitly add in the angular-router dependency.

User:

> npm install angular-router --save
routes@0.0.0 C:\src\Angular\Routes
`-- angular-router@0.0.2

NOT

> npm install @angular/router --save
routes@0.0.0 C:\src\Angular\Routes
`-- @angular/router@3.1.2

The project from the Ng Book2 demonstrates the use of this module to overlay a responsive look and feel on the App UI.