A Pen by Atishay jain

Thumbnail
This awesome code was written by 123atishay, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 123atishay ©

Technologies

  • HTML
  • CSS
  • JavaScript
    <html>
  <head>
 <script   src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-route.js"></script>

    <style>.active { color: red; font-weight: bold; }</style>
  </head>

  <body ng-app="helloworld">
    <a ui-sref="hello" ui-sref-active="active">Hello</a>
    <a ui-sref="about" ui-sref-active="active">About</a>

    <ui-view></ui-view>
  </body>
</html>

/*Downloaded from https://www.codeseek.co/123atishay/a-pen-by-atishay-jain-oEGqvy */
    


/*Downloaded from https://www.codeseek.co/123atishay/a-pen-by-atishay-jain-oEGqvy */
    var myApp = angular.module('helloworld', ['ui.router']);

myApp.config(function($stateProvider) {
  var helloState = {
    name: 'hello',
    url: '/hello',
    template: '<h3>hello world!</h3>'
  }

  var aboutState = {
    name: 'about',
    url: '/about',
    template: '<h3>Its the UI-Router hello world app!</h3>'
  }

  $stateProvider.state(helloState);
  $stateProvider.state(aboutState);
});

Comments