Quantcast
Channel: Moodle for mobile
Viewing all articles
Browse latest Browse all 8344

Re: Adding a Different Home View

$
0
0

by Jason Shaw.  

Thanks for your suggestion. Unfortunately I still have the same issue. I am fairly certain my states are registered in the stateProvider, as shown in the code snippet below. What could be the reason the states are not registering?

My component 'abcd' main.js

angular.module('mm.core.abcd', [])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('abcd', {
url: '/abcd',
templateUrl: 'core/components/abcd/templates/courses.html',
controller: 'CoursesCtrl'
})
.state('abcd.course-detail', {
url: '/abcd/{CourseID}',
templateUrl: 'core/components/abcd/templates/course-detail.html',
controller: 'CourseDetailCtrl'
})

.state('abcd.course-sessions', {
url: '/abcd/{CourseID}/sessions',
templateUrl: 'core/components/abcd/templates/course-sessions.html',
controller: 'SessionsCtrl'
})

.state('abcd.course-online', {
url: '/abcd/{CourseID}/online',
templateUrl: 'core/components/abcd/templates/course-online.html',
controller: 'OnlineCtrl'
});
$urlRouterProvider.otherwise('/abcd');
});

I've also done what you suggested and added 'abcd' as an exception

if (toState.name.substr(0, 8) === 'redirect' || toState.name.substr(0, 15) === 'mm_contentlinks'
|| toState.name.substr(0, 4) === 'abcd') {
return;

Following is the directory structure for my custom component, under 'core,' in case this has something to do with the state registration issue.


Thanks


Viewing all articles
Browse latest Browse all 8344

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>