Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd80ce6

Browse filesBrowse files
committed
Add sanity-check for emulated encapsulation attributes in Angular 6.1.10.
1 parent 6107935 commit cd80ce6
Copy full SHA for cd80ce6
Expand file treeCollapse file tree

25 files changed

+9473
-0
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ with.
1010

1111
## My JavaScript Demos - I Love JavaScript!
1212

13+
* [Emulated Encapsulation Host And Content Attributes Are Calculated Once Per Application Life-Cycle In Angular 6.1.10](http://bennadel.github.io/JavaScript-Demos/demos/emulated-encapsulation-attributes-angular6/)
1314
* [Playing With Recursive Components In Angular 6.1.10](http://bennadel.github.io/JavaScript-Demos/demos/recursive-components-angular6/)
1415
* [Playing With Recursive Ng-Template References In Angular 6.1.10](http://bennadel.github.io/JavaScript-Demos/demos/recursive-templates-angular6/)
1516
* [Updating InVision Router Experiment To Use Lazy Loading Feature Modules In Angular 6.1.9](http://bennadel.github.io/JavaScript-Demos/demos/router-playground-lazy-load-angular6/)
Collapse file
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# Now that we're using Webpack, we can install modules locally and just ignore
3+
# them since the assets are baked into the compiled modules.
4+
node_modules/
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
:host {
3+
content: "App styles..." ; // For debugging output.
4+
display: block ;
5+
font-size: 18px ;
6+
}
Collapse file
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
// Import the core angular services.
3+
import { Component } from "@angular/core";
4+
5+
// ----------------------------------------------------------------------------------- //
6+
// ----------------------------------------------------------------------------------- //
7+
8+
@Component({
9+
selector: "my-app",
10+
styleUrls: [ "./app.component.less" ],
11+
template:
12+
`
13+
<thing-a></thing-a>
14+
<thing-b></thing-b>
15+
<thing-c></thing-c>
16+
17+
<thing-a></thing-a>
18+
<thing-b></thing-b>
19+
<thing-c></thing-c>
20+
`
21+
})
22+
export class AppComponent {
23+
// ...
24+
}
Collapse file
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
// Import the core angular services.
3+
import { BrowserModule } from "@angular/platform-browser";
4+
import { NgModule } from "@angular/core";
5+
6+
// Import the application components and services.
7+
import { AppComponent } from "./app.component";
8+
import { ThingAComponent } from "./thing-a.component";
9+
import { ThingBComponent } from "./thing-b.component";
10+
import { ThingCComponent } from "./thing-c.component";
11+
12+
// ----------------------------------------------------------------------------------- //
13+
// ----------------------------------------------------------------------------------- //
14+
15+
@NgModule({
16+
imports: [
17+
BrowserModule
18+
],
19+
declarations: [
20+
AppComponent,
21+
ThingAComponent,
22+
ThingBComponent,
23+
ThingCComponent
24+
],
25+
bootstrap: [
26+
AppComponent
27+
]
28+
})
29+
export class AppModule {
30+
// ...
31+
}
Collapse file
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
6+
<title>
7+
Emulated Encapsulation Host And Content Attributes Are Calculated Once Per Application Life-Cycle In Angular 6.1.10
8+
</title>
9+
</head>
10+
<body>
11+
12+
<h1>
13+
Emulated Encapsulation Host And Content Attributes Are Calculated Once Per Application Life-Cycle In Angular 6.1.10
14+
</h1>
15+
16+
<my-app>
17+
<p>
18+
<em>Loading files...</em>
19+
</p>
20+
21+
<p>
22+
npm Run Scripts:
23+
</p>
24+
25+
<ul>
26+
<li>
27+
<strong>npm run build</strong> &mdash; Compiles the .ts file into bundles.
28+
</li>
29+
<li>
30+
<strong>npm run watch</strong> &mdash; Compiles the .ts file into bundles and then watches files for changes.
31+
</li>
32+
</ul>
33+
</my-app>
34+
35+
</body>
36+
</html>
Collapse file
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
// Import these libraries for their side-effects.
3+
import "core-js/client/shim.min.js";
4+
import "zone.js/dist/zone.js";
Collapse file
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
// Import for side effects - we have to import this first so that the polyfills will
3+
// be available for the rest of the code.
4+
// --
5+
// NOTE: I would normally include this as an Entry bundle; but, I couldn't get the
6+
// HtmlWebpackPlugin to work properly if I did that (since I don't think it could
7+
// implicitly determine the dependency order). In the future, I might be able to make
8+
// this more dynamic (ie, use Webpack's import() syntax).
9+
import "./main.polyfill";
10+
11+
// ----------------------------------------------------------------------------------- //
12+
// ----------------------------------------------------------------------------------- //
13+
14+
// Import the core angular services.
15+
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
16+
17+
// Import the root module for bootstrapping.
18+
import { AppModule } from "./app.module";
19+
20+
platformBrowserDynamic().bootstrapModule( AppModule );
Collapse file
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
:host {
3+
content: "Thing-A styles..." ; // For debugging output.
4+
display: block ;
5+
}
Collapse file
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
// Import the core angular services.
3+
import { Component } from "@angular/core";
4+
5+
// ----------------------------------------------------------------------------------- //
6+
// ----------------------------------------------------------------------------------- //
7+
8+
@Component({
9+
selector: "thing-a",
10+
styleUrls: [ "./thing-a.component.less" ],
11+
template:
12+
`
13+
<strong>Thing A</strong>
14+
`
15+
})
16+
export class ThingAComponent {
17+
// ...
18+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.