Skip to content

Commit 9d18328

Browse files
author
Brian Hines
committed
README updates
1 parent 6ed3aee commit 9d18328

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ var app = angular.module('myApp', [
3434
This module creates a custom directive (tag) that you can use anywhere in your templates. This directive has four attributes:
3535

3636
* **icon** - This one is **required** since it defines which icon you want to display. Unlike the other two attributes, this one must be bound to a property of a controller. The accepted values for this attribute correspond to the values returned in the `icon` property of data point objects in the [Forecast.io API](https://developer.forecast.io/docs/v2). The possible options are: `clear-day`, `clear-night`, `rain`, `snow`, `sleet`, `wind`, `fog`, `cloudy`, `partly-cloudy-day`, or `partly-cloudy-night`.
37+
* **size** - This is optional, but must be bound to a property of a controller. Having this value come from the controller means that you can set it dynamically based on things like `$window.innerWidth`, etc. Since the icon is always a square, you only need to provide a single value. If the `size` attribute is not present, the default is a 64px square.
3738
* **color** - This is optional. If the `color` attribute is not present, the default is `black`.
38-
* **size** - This is optional. Since the icon is always a square, you only need to provide a single value. If the `size` attribute is not present, the default is a 64px square.
3939
* **class** - Use this to set the CSS class if needed.
4040

4141
#### Controller Example
@@ -53,6 +53,7 @@ cMod.controller( 'WeatherCtrl', function ( $scope ) {
5353
$scope.CurrentWeather = {
5454
forecast: {
5555
icon: "partly-cloudy-night",
56+
size: 100,
5657
...
5758
}
5859
};
@@ -62,7 +63,7 @@ cMod.controller( 'WeatherCtrl', function ( $scope ) {
6263

6364
#### Template Example
6465
~~~html
65-
<skycon icon="CurrentWeather.forecast.icon" color="blue" size="100"></skycon>
66+
<skycon icon="CurrentWeather.forecast.icon" color="blue" size="CurrentWeather.forecast.size"></skycon>
6667

6768
<skycon icon="CurrentWeather.forecast.icon" color="pink"></skycon>
6869

0 commit comments

Comments
 (0)