curiouswebster
asked on
Angular: Why does my CanvasComponent not reveal itself?
This makes no sense to me. I created CanvasComponent correctly, I think. I did it manually since the automtation failed me on another questionI posted,
c:\Dev\pp\src\app\app.modu le.ts
c:\Dev\pp\src\app\componen ts\canvas\ canvas.com ponent.htm l
c:\Dev\pp\src\app\app.comp onent.html
c:\Dev\pp\src\app\componen ts\canvas\ canvas.com ponent.ts
All I get is "Hello from App"
Why don't I see?
Hello from the Canvas2
You can see I have commented out:
//templateUrl: './canvas.component.html',
since that failed also.
Thanks for any help you can provide.
New news...
canvas does show in the debugger...
More new news...
When I place a <br> before <canvas></canvas>
the canvas does not show up on the pages. The same thing happens when I remove:
<p>Hello from the App</>
Lastly, I do see the message in the debugger...
Screen-Shot-2017-10-09-at-11.25.16-P.png
c:\Dev\pp\src\app\app.modu
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { CanvasComponent } from './components/canvas/canvas.component';
@NgModule({
declarations: [
AppComponent,
CanvasComponent
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
c:\Dev\pp\src\app\componen
<h1>Hello from the Canvas1</h1>
c:\Dev\pp\src\app\app.comp
<p>Hello from App</p>
<canvas></canvas>
c:\Dev\pp\src\app\componen
import { Component } from '@angular/core';
@Component({
selector: 'canvas',
//templateUrl: './canvas.component.html',
template: `<h1>Hello from the Canvas2<h1>`
})
export class CanvasComponent {
title = 'Title';
}
All I get is "Hello from App"
Why don't I see?
Hello from the Canvas2
You can see I have commented out:
//templateUrl: './canvas.component.html',
since that failed also.
Thanks for any help you can provide.
New news...
canvas does show in the debugger...
More new news...
When I place a <br> before <canvas></canvas>
the canvas does not show up on the pages. The same thing happens when I remove:
<p>Hello from the App</>
Lastly, I do see the message in the debugger...
Screen-Shot-2017-10-09-at-11.25.16-P.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER
but renaming "canvas"
Thanks!