Here is the code snippet from my app.js
:
var app = angular.module('dbpjkApps', ['ionic'])
app.controller('kategoriCtrl', function($scope) {
$scope.listKat = [
{kat: 'math'}, {kat: 'physics'}, {kat: 'English'}, {kat: 'bahasa'},
]})
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('menu1', {
url: '/menu1',
templateUrl: 'xxx.html' //this is condition what i mean.
})
.state('login1', {
url: '/login1',
templateUrl: 'login1.html'
});
$urlRouterProvider.otherwise('/login1');
})
})
During the initial step, users have to select a category from a dropdown on login1.html
.
How can I implement logic to determine if the user selects math or physics, and then direct them to either menu1.html
or menu2.html
? Additionally, how can I retrieve the selected value from login1.html
in menu1.html
or menu2.html
?
Appreciate any help and guidance. Thank you!