0

I was able to complete the groceries tutorial.

I'm trying to get my first app to work - it's not working right now.

I noticed that my project creates .map files for all the ts/js files - the groceries tutorial doesn't.

e.g. main.js.map app.routes.js.map etc and also for my components - generated during a build.

Anyone know why my project has it and not the groceries tutorial.

1 Answer 1

2

Open your tsconfig.json in the project and ensure this is set: "sourceMap": false

That should prevent source map files from being generated. Often when you setup a new TypeScript project, the default tsconfig.json can have that set to true initially.

You will then likely need to go and cleanup (remove) those .map files if you want them out of your project.

Additionally, you mentioned your app was not working. What about your app is not working, please include the specific error and stack trace you are experiencing.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks - that worked! On a related note - i'm using VS Code editor - is there a way to tell it not to display the .js files (because they're generated by the .ts files).
Re the problem - trying to display a page and it's not using the html layout file. I'm using router and it calls the .ts file ngOnInit(). In that file, I have the Component structure defined with templateUrl pointed to the html file. I don't get a file-not-found.<br/>@Component({ selector: "listview", templateUrl: "pages/listview/listview.html", styleUrls: ["pages/listview/listview-common.css"] }) Here's the html file <Label text="Tap the button" class="title"></Label>
I'm trying to put in line breaks. <br/> or space-space ENTER - both didn't work. Help a newbie here!
I got it to work. I had this for compenent definition @Component({ selector: "listview", template:<Label text="Tap the button" class="title"></Label>` })`. As soon as I changed the selector to "list" - it worked. The only place where I think that would be referenced is in the RouterConfig path attribute...over there I have a blank string - which I assume means default path. Why would "list" work and not "listview"?
I changed the selector to a random string and that works also - just not listview. listview happens to be the name of the file - /pages/listview/listview.ts. Apologies for the formatting and multiple entries. Trying to get this stackoverflow thing down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.