2016-07-05 50 views
0

我創建了一個帶有單頁的離子項目,現在我正嘗試使用命令ionic page about添加一個名爲about的新頁面,但是我收到了page is not a valid task。 還有我的終端:將頁面添加到離子

cameraApp brill$ ionic page about 
(node:2213) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. 
    _    _   
(_)   (_)   
    _ ___ _ __ _ ___  
| |/ _ \| '_ \| |/ __| 
| | (_) | | | | | (__  
|_|\___/|_| |_|_|\___| CLI v2.0.0-beta.32 

Usage: ionic task args 


======================= 
page is not a valid task 


Available tasks: 
(use --help or -h for more info) 


    start .......... Starts a new Ionic project in the specified PATH 
    serve .......... Start a local development server for app dev/testing 
    generate ....... Generate pages and components 
    platform ....... Add platform target for building an Ionic app 
    run ............ Run an Ionic project on a connected device 
    emulate ........ Emulate an Ionic project on a simulator or emulator 
    build .......... Build (prepare + compile) an Ionic project for a given platform. 

    plugin ......... Add a Cordova plugin 
    resources ...... Automatically create icon and splash screen resources (beta) 
       Put your images in the ./resources directory, named splash or icon. 
       Accepted file types are .png, .ai, and .psd. 
       Icons should be 192x192 px without rounded corners. 
       Splashscreens should be 2208x2208 px, with the image centered in the middle. 

    upload ......... Upload an app to your Ionic account 
    share .......... Share an app with a client, co-worker, friend, or customer 
    lib ............ Gets Ionic library version or updates the Ionic library 
    io ............. Integrate your app with the ionic.io platform services (alpha) 
    security ....... Store your app's credentials for the Ionic Platform (alpha) 
    push ........... Upload APNS and GCM credentials to Ionic Push (alpha) 
    package ........ Use Ionic Package to build your app (alpha) 
    config ......... Set configuration variables for your ionic app (alpha) 
    service ........ Add an Ionic service package and install any required plugins 
    add ............ Add an Ion, bower component, or addon to the project 
    remove ......... Remove an Ion, bower component, or addon from the project 
    list ........... List Ions, bower components, or addons in the project 
    info ........... List information about the users runtime environment 
    help ........... Provides help for a certain command 
    link ........... Sets your Ionic App ID for your project 
    hooks .......... Manage your Ionic Cordova hooks 
    state .......... Saves or restores state of your Ionic Application using the package.json file 
    docs ........... Opens up the documentation for Ionic 

ECENMBRJJCC:cameraApp brill$ 

回答

0

正確的語法是ionic g page about,你只是缺少克(這可能代表發電機)。您可以在Ionic V2 documentation中找到更多信息。

+0

它的工作原理! Thaanks! – Developer2012