Answer the question
In order to leave comments, you need to log in
How to define two routes with the same structures?
Hello everyone, I can’t understand why, when creating two identical states, he swears
RangeError: Maximum call stack size exceeded
and the state is as follows:
___________________1____________________
angular.module('listing', []).
config(($stateProvider)=>{
$stateProvider.state({
name: 'listing',
url:'/listing',
templateUrl: '/simblebooking/listings/listing.html',
controller: function(){
console.log (123);
}
});
});
___________________2____________________
angular.module('signup', []).
config(($stateProvider)=>{
$stateProvider.state({
name: 'signup',
templateUrl: '/simblebooking/signup/first/signup.html'
});
});
and both are included in the main route:
import angular from 'angular'
import router from 'angular-ui-router'
// local modules //
import home from './home/RouteHome.js'
import component from './components/mainConponents .js'
import signup from './signup/routerSignup.js'
import listing from './listings/routerListing.js'
angular.module('app', [
'ui.router',
'homeRouter',
'signup',
'app.components',
'listing',
])
.
I can not understand if they are connected in one module like this:
angular.module('app', ['ui.router']).
config(($stateProvider, $urlRouterProvider)=>{
$urlRouterProvider.otherwise('/');
$stateProvider.state({
name:'home',
url:'/',
templateUrl: '/simblebooking/home/home. html',
}).
state({
name: 'booking',
url:'/booking',
templateUrl:'/simblebooking/listings/booking/booking.html',
}).
state({
name: 'signup',
url :'/signup',
templateUrl:'/simblebooking/signup/pages/signup.html',
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question