# Category: dom

## Angular4: Create a Directive to Show a Profile card on Hover

For reference you can visit Twitter and hover a Profile name. That is what i’m trying to achieve. The Hover card does show correctly, But i’ve to add the ng-template each and everywhere I’ve to have this feature <div profilePeek class=”user-name cursor” (click)=”redirectProfile(item.type,item.id)”>{{ getProfileData(item.type, item.id).name }} <ng-template #preview> <app-hover-profile [type]=”item.type” [key]=”item.id”></app-hover-profile> </ng-template> </div> Can this be included in the Directive as well. Im pretty new to directives, so please guide if this is a blunder. […]

## Appending a list iterating in AngularJS to the HTML DOM

So I have an AngularJS function that when called should add a list element to a div in the DOM, and the list should be ng-repeat so that it could iterate on objects from a list. These objects in the list contain a few properties which I want to print out. Part of the AngularJS program var el = angular.element(document.getElementById(‘categories’)); el.append(‘<ul id=”‘ + categoryItemStr + ‘”><li ng-repeat=”item in categories[currentCategory]”><h4 class=”h4″>{{item.itemName}}</h4>{{item.itemDescription}}<br><span style=”font-size:11px;”>{{item.itemPrice}}.00 \$</span></li></ul>’); But when I […]

## Integrate Mapzen with Angular-Leaflet-Directive

Trying to integrate Mapzen’s geocoding services which provides a method to autocomplete location searches, with the Angular-Leaflet-Directive. I’m quite new to Angular, and don’t know how it all works yet, so I’ve probably not set everything up straight. The map works and all that, but when I add the map variable for the Mapzen-service, I get this error-message: Uncaught Error: Map container not found. I’m guessing it either has to do with the variable not […]