This commit is contained in:
Max Lynch
2013-11-13 18:40:23 -06:00
parent 935c3dd2dd
commit 8e738713d5
10 changed files with 85 additions and 18 deletions

View File

@ -25,7 +25,11 @@ angular.module('ionic.weather.directives', [])
replace: true,
transclude: true,
template: '<div id="small-weather" ng-transclude></div>',
link: function($scope, $element, $attr) {
compile: function(element, attr) {
console.log('SMALL COMPILED');
return function($scope, $element, $attr) {
console.log('SMALL LINKED');
// Delay so we are in the DOM and can calculate sizes
$timeout(function() {
@ -38,6 +42,7 @@ angular.module('ionic.weather.directives', [])
angular.element(document.querySelector('.content')).css('-webkit-overflow-scrolling', 'touch');
}, 50);
});
}
}
}
})

View File

@ -9,10 +9,11 @@
<link rel="stylesheet" href="weather.css">
<script src="/vendor/angular/angular-1.2.0rc2.min.js"></script>
<script src="/vendor/angular/angular-touch.js"></script>
<script src="/vendor/angular/angular-animate.js"></script>
<script src="/vendor/angular/angular-resource.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-touch.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-resource.js"></script>
<script src="/dist/js/ionic.js"></script>
<script src="/dist/js/ionic-angular.js"></script>
@ -20,6 +21,7 @@
<script src="directives.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="WeatherCtrl">
<div id="bg-image" ng-style="getActiveBackgroundImage()"></div>