Demo ui-router basic state change
How do I make an demo ui-router basic state change?
What is a demo ui-router basic state change? How do you make a demo ui-router basic state change? This script and codes were developed by Aaron K Saunders on 25 September 2022, Sunday.
Demo ui-router basic state change - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Demo ui-router basic state change</title>
</head>
<body> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <link href="https://code.ionicframework.com/1.0.0/css/ionic.min.css" rel="stylesheet"> <script src="https://code.ionicframework.com/1.0.0/js/ionic.bundle.js"></script> </head> <body ng-app="app"> <ion-nav-bar class='bar-positive'> <ion-nav-back-button class="button-clear"> <i class="ion-arrow-left-c"></i> Back </ion-nav-back-button> </ion-nav-bar> <ion-nav-view animation="slide-left-right"></ion-nav-view> <script type="text/ng-template" id="home.html"> <ion-view title="Home"> <ion-content class="padding"> <button class="button button-assertive" ui-sref="detail"> Goto State 'detail' </button> <pre class="padding">{{stateInfo | json}}</pre> {{date}} </ion-content> </ion-view> </script> <script type="text/ng-template" id="detail.html"> <ion-view title="Detail"> <ion-content class="padding"> <pre class="padding">{{stateInfo | json}}</pre> {{date}} </ion-content> </ion-view> </script> </body>
</html> <script src="js/index.js"></script>
</body>
</html>
Demo ui-router basic state change - Script Codes JS Codes
myApp = angular.module('app', ['ionic']);
myApp.config(function($stateProvider, $urlRouterProvider) { // // For any unmatched url, redirect to /state1 $urlRouterProvider.otherwise("/home"); // // Now set up the states $stateProvider .state('home', { url: "/home", templateUrl: "home.html", controller :"homeCtrl" }) .state('detail', { url: "/detail", templateUrl: "detail.html", controller :"detailCtrl" });
})
.controller('homeCtrl', function($scope, $state) { $scope.stateInfo = $state.current; $scope.date = new Date();
})
.controller('detailCtrl', function($scope, $state) { $scope.stateInfo = $state.current;
})
Developer | Aaron K Saunders |
Username | aaronksaunders |
Uploaded | September 25, 2022 |
Rating | 3 |
Size | 2,042 Kb |
Views | 30,360 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Google Map Directive in Ionic | 3,479 Kb |
A Pen by aaron k saunders | 2,286 Kb |
Demo ui-router basic state change | 2,042 Kb |
Ionic 2 Tabs Starter | 3,059 Kb |
Firebase Login Example | 2,682 Kb |
A Pen by aaron k saunders | 2,916 Kb |
Promise sample for Cross-Platform mobile application class | 2,214 Kb |
Angular2 Http Example | 3,851 Kb |
Leaflet Map Directive in Ionic | 2,517 Kb |
A Pen by aaron k saunders | 4,143 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Simple content swap | Snografx | 1,859 Kb |
Search Box in Content Moves to Fixed Header | Chriscoyier | 2,768 Kb |
Project Euler Problem 17 | Bfillmer | 2,739 Kb |
Fullscreen audio play button | 72 | 2,148 Kb |
Sequence.js - Sliding Horizontal Parallax | Maheshc | 4,537 Kb |
Price table | Serluk | 5,928 Kb |
Twitch | SarahDunlap | 2,937 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
Resume | Rottingroom | 5,483 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!