Search Posts

Category: pug

AngularJS ui-select not showing selected values

I get data in {{modalcontactData}} if i simply put this in my jade file its showing object like this: { “id”: 20, “gsm”: “123456789”, “firstName”: “Mohamed”, “lastName”: “Sameer”, “email”: “[email protected]”, “contactgroups”: [ { “id”: 1, “contactId”: 20, “groupId”: 14, “group”: { “id”: 14, “groupname”: “Angular”, } } { “id”: 3, “contactId”: 21, “groupId”: 15, “group”: { “id”: 15, “groupname”: “React”, } } ] } My jade code: .modal-body ui-select(multiple=”, ng-model=’modalcontactData’, theme=’select2′) ui-select-match(placeholder=’Select Groups…’) {{$item.groupname}} ui-select-choices(repeat=’ […]

ngRoute loads only template on refresh

I have a project using nodejs with express & pug in the backend, and AngularJS with ngroute on the frontend. The way it used to work was: I enter website, it loads index.html (with angular stuff) and then /home(with content created with pug) as a view. When i choose to enter another document, angular requests it from express, and server fills it with pug (eg. /users), angular loads it into view leaving menu,etc. untouched It […]

how to make one ng-repeat to work on different columns in different rows

I am trying to display data formulated like this using angular “a”:[{ “name”: “a’s name” “b”:[{ “name”:”b’s name” “c”:[{ “name”: “c’s name” “d”:[{ “name”:”d’s name” }] }] }] }] and i tried this but it couldn’t work tr td(ng-repeat=”oneB in a.b”) | {{}} tr td(ng-repeat=”oneC in oneB.c”) | {{}} tr td(ng-repeat=”oneD in oneC.d”) | {{}} and also this tr td(ng-repeat-start=”oneB in a.b”) | {{}} tr td(ng-repeat-end,ng-repeat-start=”oneC in oneB.c”) | {{}} tr td(ng-repeat-end,ng-repeat=”oneD in oneC.d”) | […]

unable to load dynamic page in view only mode based on condition

In jade file, on particular condition i need to make the field in view only mode. but when i give the condition ng-class=”details.lockedStatus.isLocked ? ‘view’ : ‘editView’” . The page is not fully rendered…… form(name=”mainForm” class=”form-horizontal” ng-class=”details.lockedStatus.isLocked ? ‘view’ : ‘editView'”) md-content(style=””) md-tabs(md-dynamic-height=”, md-border-bottom=”) md-tab(label=’Project Details’)”color:#315a8e”) Project Infomation md-content(md-theme=’docs-dark’, style=”font-size: 16px; width: 99%;” layout-padding=” class=”border”) div(ng-repeat=”p in details.project_details” class=”col-md-3″ style=”margin-top:10px; margin-top: 10px; float: left;”) md-input-container(style=”” ng-if=”p.type == ‘text'” class=”col-md-12″) label {{p.label}} <span style=”color:#ff0000″ […]

ng repeat json parse show empty string

I had the array of objects string from a list of array. I convert object string to object using method of JSON.parse the object but it shows empty within ng-repeat. Jade .item.col-md-4(ng-repeat=’p in searchData | filter: paginate | orderBy: sortKey ‘) // `p` is a object of string, for example “{id:2, name:’abel’}”; – var property = JSON.parse(“{{ p }}”); // Error at this line +AddPropertyCard(property) Error var property = JSON.parse(“”); Unexpected token { in JSON […]