Reputation: 1692
I'm an Ionic newb, and I can't seem to figure this out. I created a project in Ionic Creator, then exported the Zip. Now I've got the controller.js
, services.js
files, etc, but they don't look anything like the sample sources that are in the documentation: https://ionicframework.com/docs/components/#action-sheets
When I try to find samples, I see stuff like https://github.com/ionic-team/ionic-preview-app/tree/master/src/pages/action-sheets/basic but the code conforms to what is in the documentation.
For instance, the exports have things like this from controllers.js
:
angular.module('app.controllers', [])
.controller('page1Ctrl', ['$scope', '$stateParams', // The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams) {
}])
While sample code is built out like classes:
import { ActionSheetController } from 'ionic-angular';
export class MyPage {
constructor(public actionSheetCtrl: ActionSheetController) { }
So the question:
How would I go about using ionViewDidEnter
in the structure of an Ionic Creator export?
Upvotes: 0
Views: 106
Reputation: 320
I get your problem. What is happening is that you have created a project in Ionic Creator of Ionic version 1.x (1.3.2). Ionic 1 is based on Angular 1.x, and Ionic 2 is based on Angular >= 2.x. With Ionic 1 you will see controller.js, services.js and files like that. With Ionic 2/3, you will see classes, components, and stuff like that.
You need to select the Ionic version before you start creating your design with Ionic creator.
Upvotes: 1