@@ -302,6 +302,93 @@ describe('no-access-missing-member', () => {
302
302
assertSuccess ( 'no-access-missing-member' , source ) ;
303
303
} ) ;
304
304
305
+ it ( 'should not throw when routerLinkActive template ref is used in component' , ( ) => {
306
+ let source = `
307
+ @Component({
308
+ selector: 'foobar',
309
+ template: '<a #test="routerLinkActive" [routerLinkActive]="">{{ test }}</a>'
310
+ })
311
+ class Test {}` ;
312
+ assertSuccess ( 'no-access-missing-member' , source ) ;
313
+ } ) ;
314
+
315
+
316
+ it ( 'should not throw when ngModel template ref is used in component' , ( ) => {
317
+ let source = `
318
+ @Component({
319
+ selector: 'foobar',
320
+ template: '<input #test="ngModel" [(ngModel)]="foo">{{ test }}'
321
+ })
322
+ class Test {
323
+ foo: string;
324
+ }` ;
325
+ assertSuccess ( 'no-access-missing-member' , source ) ;
326
+ } ) ;
327
+
328
+ it ( 'should not throw when [md-menu-item] template ref is used in component' , ( ) => {
329
+ let source = `
330
+ @Component({
331
+ selector: 'foobar',
332
+ template: '<div md-menu-item #test="mdMenuItem">{{ test }}</div>'
333
+ })
334
+ class Test {
335
+ foo: string;
336
+ }` ;
337
+ assertSuccess ( 'no-access-missing-member' , source ) ;
338
+ } ) ;
339
+
340
+ it ( 'should not throw when md-menu template ref is used in component' , ( ) => {
341
+ let source = `
342
+ @Component({
343
+ selector: 'foobar',
344
+ template: '<md-menu #test="mdMenu">{{ test }}</md-menu>'
345
+ })
346
+ class Test {
347
+ foo: string;
348
+ }` ;
349
+ assertSuccess ( 'no-access-missing-member' , source ) ;
350
+ } ) ;
351
+
352
+ it ( 'should not throw when md-button-toggle-group template ref is used in component' , ( ) => {
353
+ let source = `
354
+ @Component({
355
+ selector: 'foobar',
356
+ template: '<md-button-toggle-group #test="mdButtonToggleGroup">{{ test }}</md-button-toggle-group>'
357
+ })
358
+ class Test {}` ;
359
+ assertSuccess ( 'no-access-missing-member' , source ) ;
360
+ } ) ;
361
+
362
+ it ( 'should not throw when md-menu-trigger-for template ref is used in component' , ( ) => {
363
+ let source = `
364
+ @Component({
365
+ selector: 'foobar',
366
+ template: '<div mdMenuTriggerFor #test="mdMenuTrigger">{{ test }}</div>'
367
+ })
368
+ class Test {}` ;
369
+ assertSuccess ( 'no-access-missing-member' , source ) ;
370
+ } ) ;
371
+
372
+ it ( 'should not throw when mdTooltip template ref is used in component' , ( ) => {
373
+ let source = `
374
+ @Component({
375
+ selector: 'foobar',
376
+ template: '<div mdTooltip #test="mdTooltip">{{ test }}</div>'
377
+ })
378
+ class Test {}` ;
379
+ assertSuccess ( 'no-access-missing-member' , source ) ;
380
+ } ) ;
381
+
382
+ it ( 'should not throw when mdSelect template ref is used in component' , ( ) => {
383
+ let source = `
384
+ @Component({
385
+ selector: 'foobar',
386
+ template: '<md-select #test="mdSelect">{{ test }}</md-select>'
387
+ })
388
+ class Test {}` ;
389
+ assertSuccess ( 'no-access-missing-member' , source ) ;
390
+ } ) ;
391
+
305
392
it ( 'should fail with missing ref' , ( ) => {
306
393
let source = `
307
394
@Component({
0 commit comments