Skip to content

Commit

Permalink
Update angular app file mappings for #2
Browse files Browse the repository at this point in the history
There should be a way to do this in systemjs.config.js, but it wasn’t
working well in this case. Room for improvement …
  • Loading branch information
khawkins98 committed Jun 13, 2017
1 parent af6e81c commit bb46132
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions content/websites/patterns/taxonomy-lookup/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Run angular client side -->
<script>document.write('<base href="' + document.location + '" />');</script>
<!-- <script>document.write('<base href="' + document.location + '" />');</script> -->
<base href="http://localhost:8000/websites/patterns/taxonomy-lookup/">
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
<script src="https://unpkg.com/[email protected]?main=browser"></script>
<script src="https://unpkg.com/[email protected]/dist/system.src.js"></script>
<script src="taxonomy-lookup/systemjs/systemjs.config.js"></script>
<script src="systemjs/systemjs.config.js"></script>
<script>
System.import('taxonomy-lookup/tax/src/main.ts').catch(function(err){ console.error(err); });
System.import('tax/src/main.ts').catch(function(err){ console.error(err); });
</script>
<!-- END Run angular client side -->
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Component } from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
templateUrl: './tax/src/app/app.component.html',
styleUrls: ['./tax/src/app/app.component.css']
})
export class AppComponent {
title = 'Taxonomy Lookup';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { TypeaheadModule } from 'ngx-bootstrap';

import { AppComponent } from './app.component';
import { TaxLookupComponent } from './tax-lookup/tax-lookup.component';
import { AppComponent } from './app.component.ts';
import { TaxLookupComponent } from './tax-lookup/tax-lookup.component.ts';

@NgModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { environment } from "environments/environment";

@Component({
selector: 'app-tax-lookup',
templateUrl: './tax-lookup.component.html',
styleUrls: ['./tax-lookup.component.css']
templateUrl: './tax/src/app/tax-lookup/tax-lookup.component.html',
styleUrls: ['./tax/src/app/tax-lookup/tax-lookup.component.css']
})
export class TaxLookupComponent implements OnInit {
public asyncSelected: string;
Expand Down
4 changes: 2 additions & 2 deletions content/websites/patterns/taxonomy-lookup/tax/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { AppModule } from './app/app.module.ts';
import { environment } from './environments/environment.ts';

if (environment.production) {
enableProdMode();
Expand Down

0 comments on commit bb46132

Please sign in to comment.