angularjs-ng-template

AngularJS trouble adding page titles

China☆狼群 提交于 2019-12-13 06:01:06
问题 I am writing a web app using AngularJS. It is not a single page application but all my codes are in one file- index.ejs. So my set up for index.ejs roughly looks like this: <head> <title> Main page </title> </head> <body> <div class="row"> <div class="col-md-10 col-md-offset-1"> <ui-view></ui-view> </div> </div> <script type = "text/ng-template" id = "/main.html"> ..... </script> <script type = "text/ng-template" id = "/addStuff.html"> ..... </script> <script type = "text/ng-template" id = "

Angular ViewChild fileInput annotation is undefined

[亡魂溺海] 提交于 2019-12-12 04:09:34
问题 If my fileInput element is in a normal div, then it works fine. But if I place it inside <ng-template></ng-template> then I am getting it undefined. Here is my code : HTML <ng-template #content let-c="close" let-d="dismiss"> <div class="modal-header"> <h4 class="modal-title">Modal title</h4> <button type="button" class="close" aria-label="Close" (click)="d('Cross click')"></button> </div> <div class="modal-body"> <form #documentsForm="ngForm" (ngSubmit)="onEditSubscriberDocumentsSubmit

Inline `ng-template` not found by `ng-include`

蹲街弑〆低调 提交于 2019-12-07 03:52:00
问题 I have a view being loaded with an embedded text/ng-template which is not being found by a ng-include later in the file. The script block sits at the very top of the view file: <script type="text/ng-template" id="stringCondition"> <!-- template guts --> </script> Which I am loading later in the file with: <ng-include src="'stringCondition'"></ng-include> But is producing a 404 error in the console: GET http://localhost/~me/stringCondition 404 (Not Found) I've tried several variants on naming

Inline `ng-template` not found by `ng-include`

孤者浪人 提交于 2019-12-05 06:34:16
I have a view being loaded with an embedded text/ng-template which is not being found by a ng-include later in the file. The script block sits at the very top of the view file: <script type="text/ng-template" id="stringCondition"> <!-- template guts --> </script> Which I am loading later in the file with: <ng-include src="'stringCondition'"></ng-include> But is producing a 404 error in the console: GET http://localhost/~me/stringCondition 404 (Not Found) I've tried several variants on naming (like having .html on the end) and using ng-include as an attribute instead of the high level element.