Angular2 Selector did not match any elements with bundle and ECM6

后端 未结 1 666
忘了有多久
忘了有多久 2021-02-20 08:10

I have a very simple angular2 project, configured to work with Gulp, Bundle and ECM6. Bundle will create a big file which contains the translated ECM5 of angular plus my app.

1条回答
  •  醉梦人生
    2021-02-20 08:41

    The problem was that I was including the bundle.js before the mainapp component was defined in the HTML. This fixed the issue.

    
    
    
        Angular 2 Test
    
    
    
    
    
    
    
    
    
    
    

    Update:

    
    

    Seems to also solve the problem regardless of the order of the elements.

    0 讨论(0)
提交回复
热议问题