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 |
Nested ng-repeat in AngularJS with Checkboxes | 2,600 Kb |
A Pen by aaron k saunders | 4,143 Kb |
Ionic 2 Tabs Starter | 3,059 Kb |
A Pen by aaron k saunders | 2,286 Kb |
Promise sample for Cross-Platform mobile application class | 2,214 Kb |
Angular2 Http Example | 3,851 Kb |
Firebase Login Example | 2,682 Kb |
A Pen by aaron k saunders | 2,916 Kb |
Using ui-router to control application flow | 3,448 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 |
Disable JavaScript execution from console | Ludviglindblom | 2,534 Kb |
Portfolio Page | HuffmanJ25 | 5,240 Kb |
Blackberry Mock | Zacharyolson | 1,865 Kb |
CSS3 Latte Art Logo | Esambino | 2,036 Kb |
Rotate Demo | Agelber | 3,061 Kb |
Text Looping Transition | Agelber | 5,619 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
Google Chrome Icon using Pure CSS in one DIV | Grssam | 3,627 Kb |
Client-side Email Validation | Collizo4sky | 1,538 Kb |
Whyutils | LeYvan | 3,752 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!