Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4837

Can't import js file

$
0
0

@NomNuggetNom wrote:

When I try an import a file, my page simply doesn't render. Here's the file I'm trying to import:

// vendor/sys.js
export class Sys {
	static func() {
		return 'test';
	}
}

Here's where I'm trying to import:

// app/routes/txt.js
import Ember from 'ember';

export default Ember.Route.extend({
	model() {
		return 'test';
	}
});

When I add the following line to the router:

import Sys from '../../vendor/sys'; (note: I also tried import {Sys} but neither works)

The page completely stops rendering, but no errors are thrown in console. Am I doing something wrong?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4837

Trending Articles