Created
January 19, 2015 19:26
-
-
Save brycepj/8199745d8c7aeeebd4d4 to your computer and use it in GitHub Desktop.
scope problemz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When I inspect the scope `in_labor` equals true. So why is it making the ng-if evaluate to false? | |
(When I remove in_labor it evaluates to true and displays the .panel) | |
``` | |
.panel.labor-alert(ng-controller='LaborAlertCtrl' ng-if='apps.KEARTH && laborAlert.show && in_labor') | |
.panel-body | |
p | |
strong In labor: {{ in_labor }} | |
p | |
a(href='http://google.com') Continue Labor Flow sheet | |
//- a(sref="'top.episode.ehr.encounters.1.labor'" href) Continue Labor Flowsheet | |
button.btn.btn-link.pull-right(ng-click='laborAlert.show=false') | |
i.fa.fa-close.fa-2x | |
``` | |
``` | |
.controller('LaborAlertCtrl', function($scope, ehrContext, ehrApi) { | |
var get_episode = ehrContext.get_episode(); | |
get_episode.then(function(episode) { | |
ehrApi.call("labor_check/in_labor", {episode:episode}).then(function(status) { | |
$scope.in_labor = status; | |
}); | |
}); | |
}); | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment