ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
127 stars 85 forks source link

Module parse failed: Unterminated string constant #944

Open scarings opened 5 years ago

scarings commented 5 years ago

I'm submitting a ... (check one with "x") [x ] bug report [ ] feature request

Current behavior: after genererate page using cli, and run use ionic serve, the application show me this error

Error: ./src/pages/payment-order-success/payment-order-success.ts
Module parse failed: Unterminated string constant (28:196)
You may need an appropriate loader to handle this file type.

Related code:

.ts

@IonicPage()
@Component({
  selector: 'page-payment-order-success',
  templateUrl: 'payment-order-success.html',
})
export class PaymentOrderSuccessPage {

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad PaymentOrderSuccessPage');
  }

}
<ion-header>

  <ion-navbar color="white">
    <ion-title>Pembayaran</ion-title>
  </ion-navbar>

</ion-header>

<ion-content padding>
      <img src="assets/icon/ico_success.png" height=200/>
      <div>
          <span label-block spacing-m font-xxxxl>
              Pemesan Selesai
            </span>
            <span label-block spacing-m font-l>
              Silahkan melakukan pembayaran sebesar
            </span>
            <span ion-text color="gray" font-s>
              Pembayaran otomatis terverifikasi oleh sistem,
silahkan cek notifikasimu
            </span>
      </div>
</ion-content>

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.2.0
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.12.0
    npm               : 6.4.1
    OS                : macOS
    Xcode             : Xcode 10.0 Build version 10A255

Environment Variables:

    ANDROID_HOME : /Users/a131559-Samudra-N/Library/Android/sdk
longgt commented 5 years ago

@scarings img tag should not have self-closed style and height property should have quotation mark.

scarings commented 5 years ago

@scarings img tag should not have self-closed style and height property should have quotation mark.

hey @longgt , trying your solution, but showing this error..