Cannot find html and css file for Angular Dart component


I am using Angular Dart version ^1.1.2+2. I have a custom Angular component I am using that has a dart file, html file, and css file. When I run in Dartium, everything seems to work fine. However, when I compile everything up and run it in Chrome or Firefox, I get these errors:

GET net::ERR_CONNECTION_CLOSED html dart2js.dart:18457
GET net::ERR_CONNECTION_CLOSED html dart2js.dart:18457

This is what the beginning of the .dart file looks like

    selector: 'playbackProcessingController',
    templateUrl: 'PlaybackSignalProcessingController.html',
    cssUrl: 'PlaybackSignalProcessingController.css',
    useShadowDom: false)
class PlaybackSignalProcessingController extends MainController {
  PlaybackSignalProcessingController get playbackprocessingctrl => this;

  PlaybackSignalProcessingController(EventBus eb) : super(eb)  {
    print("Playback Signal Processing Controller Constructor");

And I bind the PlaybackSignalProcessingController in the main.dart file. I have also tried using ‘../lib/classes/Controller/PlaybackSignalProcessingController’ for the templateUrl and cssUrl paths and get the same problem. I’m not sure why it cannot find the html and css files. Any ideas? Thanks.


You can/should access to the file with something like templateUrl: 'packages/my_app/.../PlaybackSignalProcessingController.html'.

Answered By – Alexandre Ardhuin

Answer Checked By – Willingham (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.