Skip to content Skip to sidebar Skip to footer

Angular 2 Typeerror: Cannot Read Property 'animate' Of Null

I'm using Chrome 51 and Angular 2.rc4 and following errors popup in the console when loading my angular app. TypeError: Cannot read property 'animate' of null at e.supportsWebAnima

Solution 1:

I think you include your bundled js files inside of the head section in the index.html but you should transfer those to the body part under your app.

For being more clear after i transfered my application to webpack i had exactly same issue.

For example,

<!DOCTYPE html><html><head><basehref=""><title>Test</title><metacharset="UTF-8"><metaname="viewport"content="width=device-width, initial-scale=1"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><scriptsrc="prod/vendor.js"></script><scriptsrc="prod/app.js"></script></head><body><app-one>
        Loading...
    </app-one></body></html>

I transferred scripts like this

<!DOCTYPE html><html><head><basehref=""><title>Test</title><metacharset="UTF-8"><metaname="viewport"content="width=device-width, initial-scale=1"><metahttp-equiv="X-UA-Compatible"content="IE=edge"></head><body><app-one>
        Loading...
    </app-one><scriptsrc="prod/vendor.js"></script><scriptsrc="prod/app.js"></script></body></html>

Post a Comment for "Angular 2 Typeerror: Cannot Read Property 'animate' Of Null"