Last active
March 13, 2016 00:02
-
-
Save yoren/3f3c01d296803573f2b7 to your computer and use it in GitHub Desktop.
Enqueue AngularJS into your theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_scripts() { | |
wp_enqueue_script( | |
'angularjs', | |
get_stylesheet_directory_uri() . '/bower_components/angular/angular.min.js' | |
); | |
wp_enqueue_script( | |
'angularjs-route', | |
get_stylesheet_directory_uri() . '/bower_components/angular-route/angular-route.min.js' | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_scripts' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app> | |
<head> | |
<title>AngularJS Demo Theme</title> | |
<?php wp_head(); ?> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment