Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data element not working inside a modal view #34

Open
thesourav123 opened this issue Jun 3, 2017 · 2 comments
Open

Data element not working inside a modal view #34

thesourav123 opened this issue Jun 3, 2017 · 2 comments

Comments

@thesourav123
Copy link

Hi,
I am trying to achieve it inside a modal view but its not working.
The data attribute is not taking the scope value.
Its working under normal view

<ion-modal-view>
     <ion-header-bar class="bar bar-header">
          <h1 class="title">Employee Details</h1>
          <button class="button button-clear button-primary" ng-click="modal.hide()">Cancel</button>
        </ion-header-bar>
    <ion-content has-header="true" padding="true">
        <div class="list card">
              <div class="item item-avatar">
                <ng-letter-avatar charCount="2" fontSize = "25px" avatarborder="true" avatarcustombgcolor="green" data={{employee.fullName}} shape="round"></ng-letter-avatar>
                <div class = "empname">{{employee.firstName}} {{employee.lastName}}</div>
                <p>{{employee.title}}</p>
            </div>
            <a class="item item-icon-left" href="#/employees/{{employee.managerId}}" ng-if="employee.managerId > -1"><i class="icon ion-ios7-person"></i>View Manager<p>{{employee.managerName}}</p></a>
            <a class="item item-icon-left" href="#/employees/{{employee.id}}/reports" ng-if="employee.reports > 0"><i class="icon ion-person-stalker"></i>View Direct Reports<p>{{employee.reports}}</p></a>
            <a class="item item-icon-left" href="tel:{{employee.officePhone}}"><i class="icon ion-ios7-telephone"></i>Call Office<p>{{employee.officePhone}}</p></a>
            <a class="item item-icon-left" href="tel:{{employee.cellPhone}}"><i class="icon ion-ios7-telephone"></i>Call Cell<p>{{employee.cellPhone}}</p></a>
            <a class="item item-icon-left" href="sms:{{employee.cellPhone}}"><i class="icon ion-chatbox-working"></i>SMS<p>{{employee.cellPhone}}</p></a>
            <a class="item item-icon-left" href="mailto:{{employee.email}}"><i class="icon ion-ios7-email"></i>Email<p>{{employee.email}}</p></a>
        </div>

    </ion-content>
</ion-modal-view>
@gtopsis
Copy link

gtopsis commented Aug 29, 2017

Put Data value inside double quotes. Also, maybe you should remove px from fontsize attribute

@aneguzman
Copy link

Hi guys, thanks for the awesome directive.

Something similar happened to me when using this directive in a modal view. My case was a little bit different since the data value was set after an ajax request was made. Setting the attribute "dynamic=true" did the trick for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants