I am building a demo weather app, by using controller/provider & 2 directives,( with isolated scope, one directive for rendering week worth forecast & another directive to display clicked weekday forecast on top of the page).
On click on one of the week days I am trying to show clicked weekday on top of the screen. This works fine if I remove Isolated scope in directives however it does not work with isolated scope in place.
Can anyone please suggest what I am missing here?
Link: A directive with Isolated Scope: http://plnkr.co/edit/L9AcMv?p=preview ( this does not work? What Am I missing here?)
Code for your reference:
app.directive('myWeather', function() {
return {
restrict: 'EA',
transclude: 'true',
//If I comment below scope then it works fine though it does not if I am using isolated scope
scope: {
place: '=' //Two-way data binding
},
templateUrl: 'my-weather.html'
};
});
app.directive('selectedWeather', function() {
return {
restrict: 'EA',
transclude: 'true',
//If I comment below scope then it works fine though it does not if I am using isolated scope
scope: {
place: '=' //Two-way data binding
},
templateUrl: 'selected-weather.html'
};
});
Many Thanks,