javascript - Google maps full height style angularjs -
i struggling full-height google map displayed on site.
<section data-ng-controller="locationscontroller" data-ng-init="find()"> <map center="41.454161, 13.18461" zoom="6"> <span data-ng-repeat="location in locations"> <marker position="{{location.latitude}},{{location.longitude}}" title="{{location.name}}"></marker> </span> </map> </section>
i forced pass style-attribute height on element, otherwise framework ngmaps output default height of 300px element inline style.
things tried overwrite style-attribute jquery .css() defining outer divs 100% in width , height, neither worked or style set ngmaps not overwritten or map disappeared completely.
if want achieve display map on 100% height, else can make work?
pass default-style="false"
map directive remove 300px inline style:
<map center="41.454161, 13.18461" zoom="6" default-style="false">
then in css, define desired size answer above specifying correct selector:
map { position:absolute; width: 100%; height: 100%; }