I have all prerequisites installed. I’m following the installation section of the Guide.
Matts-MacBook-Pro:Projects matt$ ionic start myTest blank Running start task... Creating Ionic app in folder /Users/matt/Projects/myTest based on blank project DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip
So far, so good.
Matts-MacBook-Pro:Projects matt$ ls myTest ionic-app-base-master ionic.project
Hmm, odd. I expected to see www, js, etc.
Matts-MacBook-Pro:Projects matt$ cd myTest Matts-MacBook-Pro:myTest matt$ ionic platform android Running platform task... Adding platform android Current working directory is not a Cordova-based project. Unable to add platform android. Please see console for more info.
Matts-MacBook-Pro:myTest matt$ cd ionic-app-base-master/ && ionic platform android Running platform task... Adding platform android Creating android project... Creating Cordova project for the Android platform: Path: platforms/android Package: com.ionicframework.starter Name: HelloCordova Android target: android-19 Copying template files... Running: android update project --subprojects --path "platforms/android" --target android-19 --library "CordovaLib" Resolved location of library project to: /Users/matt/Projects/myTest/ionic-app-base-master/platforms/android/CordovaLib Updated and renamed default.properties to project.properties Updated local.properties No project name specified, using Activity name 'HelloCordova'. If you wish to change it, edit the first line of build.xml. Added file platforms/android/build.xml Added file platforms/android/proguard-project.txt Updated project.properties Updated local.properties No project name specified, using project folder name 'CordovaLib'. If you wish to change it, edit the first line of build.xml. Added file platforms/android/CordovaLib/build.xml Added file platforms/android/CordovaLib/proguard-project.txt Project successfully created.
Matts-MacBook-Pro:ionic-app-base-master matt$ ionic emulate android Running emulate task...
… and all the output that comes from firing up the emulator and compiling in cordova.
The app loads in the emulator, but if I inspect it using the Chrome inspector I see three errors:
Failed to load resource file:///android_asset/www/css/style.css Failed to load resource file:///android_asset/www/lib/ionic/js/ionic.bundle.js Uncaught ReferenceError: angular is not defined app.js:6
So, am I missing something? I’m not sure if I’m off base here because of the fact that the guide may be outdated, or should I not even believe the inspector? I have noticed that if I create an angular controller, and set a test variable (e.g. $scope.mytest = “foo”), it will not render in the view. I suspect that this is because the JS isn’t executing due to the errors referenced in the inspector. Does anyone know what’s going on here?
tl;dr: Creating new project from scratch using the beta, default project throws errors in Chrome inspector when run on Android emulator.
Any help would be greatly appreciated.