Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Unable to instantiate module

$
0
0

@Aj_Rev wrote:

Hi,

I am in the process of learning ionic with firebase as the backend. I am trying to build a test application with reference to this tutorial http://www.sitepoint.com/creating-firebase-powered-end-end-ionic-application that connects to my firebase account but ended up with the error
"Failed to instantiate module fork due to:
Error: [$injector:nomod] Module 'fork' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument"

There is also an uncaught syntax exception pointing to line 37 of my app.js file.
Structure of the app:
index.html : Defined the directive ng-app at the tag. I have included the js/controllers.js and js/app.js

app.js: I've defined the angular module here;
angular.module('fork', ['ionic', 'firebase', 'fork.controllers'])
I've defined the states here and I get a syntax error in line 37. The code is as below

.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {

$stateProvider
	.state('list', {
	url: '/',
	templateUrl: 'templates/list.html',
	controller: 'ListCtrl'
	})
$stateProvider
	.state('event', {
	url: '/event',
	templateUrl: 'templates/event.html'
	controller: 'EventCtrl' // Syntax error at this line
	})
	
$urlRouterProvider.otherwise("/");
}]);

I've a templates folder, under which I've the list.html file and the event.html file. The templates folder resides just beneath the www folder of my application. I have been trying to figure out the error for the past couple of days and have tried various options from stackoverflow but haven't been able to resolve it. Pls help! thanks for your time.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



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