Skip to content

Commit

Permalink
feat(AppComponent): add instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jvandemo committed Aug 14, 2018
1 parent f001baf commit e0d5b5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
25 changes: 7 additions & 18 deletions src/app/app.component.html
@@ -1,20 +1,9 @@
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>
<h2>Here are some links to help you start: </h2>
<h1>Angular Environment Variables Demo</h1>
<p>EnvService contains the following values:</p>
<pre>{{ env | json }}</pre>
<p>You can use <code>env.js</code> to control your environment variables without the need for a rebuild, as explained in <a href="https://jvandemo.com/how-to-use-environment-variables-to-configure-your-angular-application-without-a-rebuild/">How to use environment variables to configure your Angular application without a rebuild</a>.</p>
<p>When you build your app using <code>ng build --prod</code>, you can now either:</p>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
<li>Update the environment values in <code>env.js</code> to configure your Angular application without rebuilding it.</li>
<li>Remove <code>env.js</code> in the <code>dist</code> directory to fall back to the default values in <code>EnvService</code>.</li>
</ul>

7 changes: 6 additions & 1 deletion src/app/app.component.ts
@@ -1,10 +1,15 @@
import { Component } from '@angular/core';
import { EnvService } from 'src/app/env.service';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'angular-environment-variables-demo';

constructor(
public env: EnvService
) {
}
}

0 comments on commit e0d5b5d

Please sign in to comment.