Usman Maqbool Usman Maqbool - 2 months ago 6
AngularJS Question

results are not showing in taiga front end

I am working on customization of taiga project management system. I have code downloaded from github of taiga.io.

I am making changes in below code:

<pre>{{ user}}</pre>

<div class="create-options">
<a href="#" ng-click="vm.newProject()" title="title" class="create-project-btn button-green"></a>
<span tg-import-project-button="tg-import-project-button">
<a href="" title="title" class="button-blackish import-project-button">
<tg-svg svg-icon="icon-upload"></tg-svg>
</a>
<input type="file" class="import-file hidden"/>
</span>
</div>


Data in
{{user}}
is:

{"_attrs":{"full_name_display":"Administrator","id":4,"full_name":"Administrator","email":"admin@admin.com","is_active":true,}


When I put condition
ng-if="user.id==4"
on div then it works fine

but when I put condition
ng-if="user.full_name=="Administrator""
on div it does not work. but value of
{{user.full_name == "Administrator"}}
is
true
.

When I change condition to
ng-if="user.full_name=='Administrator'"
on div then it gives error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module taiga due to:
Error: [$injector:modulerr] Failed to instantiate module templates due to:
Error: [$injector:nomod] Module 'templates' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.4.7/$injector/nomod?p0=templates
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:6745
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:16302
at e (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:15775)
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:16087
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24768
at o (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:7152)
at p (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24616)
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24785
at o (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:7152)
at p (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24616)
at Qt (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:26306)
at s (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:13829)
at Object.at [as bootstrap] (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:14139)
at Object.<anonymous> (http://127.0.0.1:8000/v-1468840853868/js/app-loader.js:1:1516)
at Object.load (http://127.0.0.1:8000/v-1468840853868/js/libs.js:20:21097)
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:20:21149
http://errors.angularjs.org/1.4.7/$injector/modulerr?p0=templates&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20'templates'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.7%2F%24injector%2Fnomod%3Fp0%3Dtemplates%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A6745%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A16302%0A%20%20%20%20at%20e%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A15775)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A16087%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24768%0A%20%20%20%20at%20o%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A7152)%0A%20%20%20%20at%20p%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24616)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24785%0A%20%20%20%20at%20o%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A7152)%0A%20%20%20%20at%20p%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24616)%0A%20%20%20%20at%20Qt%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A26306)%0A%20%20%20%20at%20s%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A13829)%0A%20%20%20%20at%20Object.at%20%5Bas%20bootstrap%5D%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A14139)%0A%20%20%20%20at%20Object.%3Canonymous%3E%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Fapp-loader.js%3A1%3A1516)%0A%20%20%20%20at%20Object.load%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A21097)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A21149
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:6745
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:25044
at o (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:7152)
at p (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24616)
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24785
at o (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:7152)
at p (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:24616)
at Qt (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:26306)
at s (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:13829)
at Object.at [as bootstrap] (http://127.0.0.1:8000/v-1468840853868/js/libs.js:8:14139)
at Object.<anonymous> (http://127.0.0.1:8000/v-1468840853868/js/app-loader.js:1:1516)
at Object.load (http://127.0.0.1:8000/v-1468840853868/js/libs.js:20:21097)
at http://127.0.0.1:8000/v-1468840853868/js/libs.js:20:21149
at Object.<anonymous> (http://127.0.0.1:8000/v-1468840853868/js/libs.js:20:20667)
at HTMLScriptElement.n (http://127.0.0.1:8000/v-1468840853868/js/libs.js:20:20693)
http://errors.angularjs.org/1.4.7/$injector/modulerr?p0=taiga&p1=Error%3A%20%5B%24injector%3Amodulerr%5D%20Failed%20to%20instantiate%20module%20templates%20due%20to%3A%0AError%3A%20%5B%24injector%3Anomod%5D%20Module%20'templates'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.7%2F%24injector%2Fnomod%3Fp0%3Dtemplates%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A6745%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A16302%0A%20%20%20%20at%20e%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A15775)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A16087%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24768%0A%20%20%20%20at%20o%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A7152)%0A%20%20%20%20at%20p%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24616)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24785%0A%20%20%20%20at%20o%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A7152)%0A%20%20%20%20at%20p%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24616)%0A%20%20%20%20at%20Qt%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A26306)%0A%20%20%20%20at%20s%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A13829)%0A%20%20%20%20at%20Object.at%20%5Bas%20bootstrap%5D%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A14139)%0A%20%20%20%20at%20Object.%3Canonymous%3E%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Fapp-loader.js%3A1%3A1516)%0A%20%20%20%20at%20Object.load%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A21097)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A21149%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.7%2F%24injector%2Fmodulerr%3Fp0%3Dtemplates%26p1%3DError%253A%2520%255B%2524injector%253Anomod%255D%2520Module%2520'templates'%2520is%2520not%2520available!%2520You%2520either%2520misspelled%2520the%2520module%2520name%2520or%2520forgot%2520to%2520load%2520it.%2520If%2520registering%2520a%2520module%2520ensure%2520that%2520you%2520specify%2520the%2520dependencies%2520as%2520the%2520second%2520argument.%250Ahttp%253A%252F%252Ferrors.angularjs.org%252F1.4.7%252F%2524injector%252Fnomod%253Fp0%253Dtemplates%250A%2520%2520%2520%2520at%2520http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A6745%250A%2520%2520%2520%2520at%2520http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A16302%250A%2520%2520%2520%2520at%2520e%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A15775)%250A%2520%2520%2520%2520at%2520http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A16087%250A%2520%2520%2520%2520at%2520http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A24768%250A%2520%2520%2520%2520at%2520o%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A7152)%250A%2520%2520%2520%2520at%2520p%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A24616)%250A%2520%2520%2520%2520at%2520http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A24785%250A%2520%2520%2520%2520at%2520o%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A7152)%250A%2520%2520%2520%2520at%2520p%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A24616)%250A%2520%2520%2520%2520at%2520Qt%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A26306)%250A%2520%2520%2520%2520at%2520s%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A13829)%250A%2520%2520%2520%2520at%2520Object.at%2520%255Bas%2520bootstrap%255D%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A8%253A14139)%250A%2520%2520%2520%2520at%2520Object.%253Canonymous%253E%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Fapp-loader.js%253A1%253A1516)%250A%2520%2520%2520%2520at%2520Object.load%2520(http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A20%253A21097)%250A%2520%2520%2520%2520at%2520http%253A%252F%252F127.0.0.1%253A8000%252Fv-1468840853868%252Fjs%252Flibs.js%253A20%253A21149%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A6745%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A25044%0A%20%20%20%20at%20o%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A7152)%0A%20%20%20%20at%20p%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24616)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24785%0A%20%20%20%20at%20o%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A7152)%0A%20%20%20%20at%20p%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A24616)%0A%20%20%20%20at%20Qt%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A26306)%0A%20%20%20%20at%20s%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A13829)%0A%20%20%20%20at%20Object.at%20%5Bas%20bootstrap%5D%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A8%3A14139)%0A%20%20%20%20at%20Object.%3Canonymous%3E%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Fapp-loader.js%3A1%3A1516)%0A%20%20%20%20at%20Object.load%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A21097)%0A%20%20%20%20at%20http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A21149%0A%20%20%20%20at%20Object.%3Canonymous%3E%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A20667)%0A%20%20%20%20at%20HTMLScriptElement.n%20(http%3A%2F%2F127.0.0.1%3A8000%2Fv-1468840853868%2Fjs%2Flibs.js%3A20%3A20693)(anonymous function) @ angular.js:68(anonymous function) @ angular.js:4413o @ angular.js:336p @ angular.js:4374Qt @ angular.js:4299s @ angular.js:1657at @ angular.js:1678(anonymous function) @ app-loader.js:1load @ l.js:121(anonymous function) @ l.js:124(anonymous function) @ l.js:99n @ l.js:100


Backend code of taiga is in
Django
and frontend is in
angularjs
.

Is there any other condition on which I can change GUI for Admin and members.

Answer

I resolved issue by placing \ in ng-if then error was removed.

Like:

ng-if="user.full_name==\'Administrator\'"