Git Product home page Git Product logo

Comments (1)

shusain avatar shusain commented on August 17, 2024

You can make use of ng-template to override the default template entirely or just add CSS to customize the styling. Note as is the icons shown are limited, feel free to modify and make pull requests if you want to change up which icons get shown. You could also use $templateCache.put('templates/basicWeatherDisplay.tpl.html', fileContentsAsStringHere);

<script type="text/ng-template" id="templates/basicWeatherDisplay.tpl.html">
<div class="row">
  <div class="col-xs-12">

    <weather-icon-google
      cloudiness="{{ weather.clouds }}"
      custom-size="customSize"
      ng-if="useGoogleImages">
    </weather-icon-google>

    <weather-icon
      cloudiness="{{ weather.clouds }}"
      custom-size="customSize"
      ng-if="!useGoogleImages">
    </weather-icon>

    <span style="display:inline-block; vertical-align:middle">
      <h3 ng-show="weather.temp.current">
        Current: <span ng-bind-html="weather.temp.current | temp:2"></span>
      </h3>

      min: <span ng-bind-html="weather.temp.min | temp"></span><br/>
      max: <span ng-bind-html="weather.temp.max | temp"></span><br/>

      <span ng-show="weather.rain">
        <h6>
          {{weather.rain}}% Chance of rain
        </h6>
      </span>

      <span ng-hide="weather.rain">
        <h6>
          No rain expected.
        </h6>
      </span>
    </span>
  </div>
</div>
</script>

from angular-sh-weather.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.