amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 304 forks source link

Global scripts are included in the index.html but, not the .angular-cli.json - Doing such throws an error #94

Closed saiyaff closed 7 years ago

saiyaff commented 7 years ago

This is a question more than an issue. Couldn't find the reason googling. My question is since angular-cli has structured in a way that we can add all the scripts, global files and libraries in the .angular-cli.json script array or style array. Why in this repository it's done otherwise?

I've been using Cognito and I am using all these scripts in my application. It throws an error if I follow the approach recommended by angular-cli.

I've added all these scripts in the index.html after placing them in the assets folder for now as below.

<!-- Cognito -->
  <script src="./assets/js/cognito/jsbn.js"></script>
  <script src="./assets/js/cognito/jsbn2.js"></script>
  <script src="./assets/js/cognito/sjcl.js"></script>
  <script src="./assets/js/cognito/aws-cognito-sdk.min.js"></script>
  <script src="./assets/js/cognito/amazon-cognito-identity.min.js"></script>
  <script src="./assets/js/cognito/aws-sdk-2.7.13.min.js"></script>
  <script src="./assets/js/cognito/aws-sdk-mobile-analytics.min.js"></script>
<!-- /Cognito -->

Any help on reasoning and do it in the angular-cli recommended way would be appreciated.

vbudilov commented 7 years ago

I've created the project before angular2 was finalized, so many of currently-documented features weren't documented or developed. So feel free to submit a PR with any updates, especially those following angular best-practices.