diff --git a/test/templatesUsePublicRule.spec.ts b/test/templatesUsePublicRule.spec.ts
index 2de5a70c1..8328f4dbc 100644
--- a/test/templatesUsePublicRule.spec.ts
+++ b/test/templatesUsePublicRule.spec.ts
@@ -252,4 +252,37 @@ describe('templates-use-public', () => {
});
});
});
+
+ describe('binding to complex data structure', () => {
+
+ it('should work with binding to an array', () => {
+ const source = `
+ @Component({
+ template: '{{ something["a"].b }}'
+ })
+ export class DemoComponent {
+ public something: { a: any } = { a: { b: 1 } };
+ }
+ `;
+ assertSuccess('templates-use-public', source);
+ });
+
+ it('should work with binding to an array of specific class', () => {
+ const source = `
+ class Something {
+ public a = 1;
+ public b = 2;
+ }
+
+ @Component({
+ template: '{{ something[0].a }}'
+ })
+ export class DemoComponent {
+ public something: Something[] = [new Something()];
+ }
+ `;
+ assertSuccess('templates-use-public', source);
+ });
+
+ });
});
diff --git a/yarn.lock b/yarn.lock
index afd8c1fcc..8872ba601 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,13 +2,17 @@
# yarn lockfile v1
-"@angular/compiler@^4.0.0":
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.0.1.tgz#15721edb148167a2d83b6f9324817e658eac8280"
+"@angular/compiler@^4.1.3":
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.2.0.tgz#a21df81995b210f822ffd70b57247d474876fbed"
+ dependencies:
+ tslib "^1.7.1"
-"@angular/core@^4.0.0":
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.0.1.tgz#0b110a001012076ea696460ccd922707bcdf51ba"
+"@angular/core@^4.1.3":
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.2.0.tgz#8bf57d01379c2a9e29476ad569dec9e20d5b17dc"
+ dependencies:
+ tslib "^1.7.1"
"@types/chai@^3.4.33":
version "3.4.34"
@@ -1381,6 +1385,10 @@ tsconfig@^5.0.2:
strip-bom "^2.0.0"
strip-json-comments "^2.0.0"
+tslib@^1.7.1:
+ version "1.7.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec"
+
tslint@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.1.0.tgz#51a47baeeb58956fcd617bd2cf00e2ef0eea2ed9"