|
|

|
|
|
|
|
|
<h1>1. To install Angular on your local system</h1>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li><strong>Install Node.js:</strong></li>
|
|
|
</ul>
|
|
|
<ol>
|
|
|
<li>Download Node.js from here: <a href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a></li>
|
|
|
<li>Angular, the Angular CLI, and Angular applications depend on <a href="https://docs.npmjs.com/getting-started/what-is-npm">npm packages</a>for many features and functions. To check that you have the npm client installed, run<strong> npm -v</strong> in a command prompt window, and it gives the installed version as result. <br/>
|
|
|

|
|
|
</li>
|
|
|
|
|
|
</ol>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li><strong>Install the Angular CLI:</strong>
|
|
|
<ul>
|
|
|
<li>To install the Angular CLI, open a terminal window and run the following command: <strong>npm install -g @angular/cli</strong></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li>Download the code from Git repository(<a href="https://community.opengroup.org/osdu/ui/admin-ui/-/tree/master">https://community.opengroup.org/osdu/ui/admin-ui/-/tree/master</a> ), extract that folder and open that folder (OSDUApp) with Visual Studio Code (Download visual studio code from here: <a href="https://code.visualstudio.com/download">https://code.visualstudio.com/download</a>).</li>
|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li>Open the entire folder in Visual Studio Code and click on Terminal -> New Terminal from top bar.</li>
|
|
|

|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li>Once the terminal window is open you can check if angular cli is installed or not by typing the command <strong>ng v </strong>in the terminal window and the below message shows up.</li>
|
|
|

|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
<p> </p>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li>Now open config file from assets folder <strong>(path: src->assets->config->config.dev.json</strong>) as shown below. Inside config folger there will be 2 json file. One named as config.dev.json and other as config.prod.json. For testing purpose update the details for config.dev.json and for Production update config.prod.json. Inside config.dev.json update all the fields for your respective idp (<strong>auth_url,token_url,</strong><strong> logout_uri, client_id, client_secret, scope, data_partition, entitlement_endpoint, storage_endpoint, search_endpoint, legal_endpoint</strong>). For example, If your respective idp is AWS then update the details for the object where cloud_name field is “aws”. Once all the details are updated, change “in_use” key value as true for your respective ipd’s json object. Make sure that the “in_use” key value is set as false for all other objects.</li>
|
|
|

|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
<ul>
|
|
|
<li>Once everything is updated in the config file run the project using the command line <strong>ng serve -o --port 8090. </strong>This opens your browser automatically to <a href="http://localhost:8090">http://localhost:8090</a>. The ng serve command launches the server, watches your files, and rebuilds the app as you make changes to those files. If you want to run Production mode then use the command <strong>ng serve -o --port 8090 --configuration=”production”.</strong></li>
|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
<h1>2. To Deploy your Angular Code</h1>
|
|
|
<p> </p>
|
|
|
<p>After setting up your code in angular and running the file and testing it, you can deploy the code using the command <strong>ng build. </strong>This compiles your Angular app into an output directory named dist/ at the given output path.</p>
|
|
|
|