• Hi!

    I’m trying to extend the scaffolding.io theme by including some angular.js code in a custom page template.

    I’ve followed a bunch of blog posts and tutorials and I can use basic angular expressions in my theme. The required libraries are linked and I’ve wrote my first module and controller, which stablishes the connection with the wp json rest api plugin.

    While I use <body ng-app> I’m able to use angular expressions, but as soon as I change this tag to refer to my module <body ng-app=”myModule”>, angular expressions are broken and the console outputs a strange error:

    Error: [$injector:modulerr] http://errors.angularjs.org/1.2.26/$injector/modulerr?p0=myModule

    I’ve changed the libraries linked, the name of my module, the name of the javascript files with my code, the order in enqueuing the scripts to wordpress… still broken!

    Maybe some of you have some idea or experience doing that kind of experiments?

  • The topic ‘Errors when using angular in wordpress custom template’ is closed to new replies.