Declare controller in app.js

Hi everyone, I am having a problem with declaring controller in my app.js (I am new to both ionic and angularJS)

This is the additional code I have in app.js

var myApp = angular.module('starter', ['ionic']) 
//additional code on running and configuration

myApp.controller ("venueCtrl", funciton($scope) {
});

The problem I am having is: If I declare a controller, the whole app shutdowns (it shows nothing but blank). I believe that is a problem because when I comment the controller part out, everything is back to work. Can someone help me out? I have learnt some basic angularJS so I can understand some basic concept.

I think there is a mistake in the word function

try this:
myApp.controller (“venueCtrl”, function($scope) {
});

1 Like

If you face any problem ,Your first action should be check console. If you using chrome use right click anywhere on page and select “Inspect Element” and gointo console . It will show you error .

For inspect devices use chrome://inspect/#devices

1 Like