Hi team
I need some help, i have an Angular js file called "Modal.js" sitting under Script folder on mvc asp.net project and have installed Angular JS using command on nu-get. Let me share the error, basically want to create modal popup using Angular js on my front end.
// Angular js
import { Component, Input } from '@angular/core'; // Error here Uncaught SyntaxError: Cannot use import statement outside a module"
import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'ngb-modal-content',
templateL `
Hi there!
Hello, {{name}}!
`
})
// index.chstml

Rijwan AnsariRank #82 · 24.2K reputationPosted Sep 23, 2021, 8:45 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Sep 23, 2021, 7:55 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Sep 23, 2021, 8:26 AM EDT
class
="modal-title">Hi there!Hello, {{name}}!
Sachin SinghRank #66 · 26.2K reputationPosted Sep 23, 2021, 5:30 AM EDT
Inside the Layout or Index page change this"../src/main.js">to
"module" src="../src/main.js">Guest UserRank #877 · 2.5K reputationPosted Sep 23, 2021, 5:31 AM EDT
Guest UserRank #877 · 2.5K reputationPosted Sep 23, 2021, 8:20 AM EDT
Hi there!
Hello, {{name}}!
Guest UserRank #877 · 2.5K reputationPosted Sep 23, 2021, 8:30 AM EDT