Last active
August 29, 2015 14:12
-
-
Save yoren/572b4fc3fa1e84d9f7fc to your computer and use it in GitHub Desktop.
Minification Errors In My AngularJS WordPress 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
//Main controller | |
app.controller('Main', ['$scope', '$http', function(a, b) { | |
b.get('wp-json/posts/').success(function(res){ | |
a.posts = res; | |
}); | |
}]); |
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
//Main controller | |
var mainFunc = function($scope, $http) { | |
$http.get('wp-json/posts/').success(function(res){ | |
$scope.posts = res; | |
}); | |
}; | |
mainFunc.$inject = ['$scope', '$http']; | |
app.controller('Main', mainFunc); |
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
//Main controller | |
app.controller('Main', ['$scope', '$http', function($scope, $http) { | |
$http.get('wp-json/posts/').success(function(res){ | |
$scope.posts = res; | |
}); | |
}]); |
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
var app = angular.module('app', ['ngRoute', 'ngSanitize']); |
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
var app=angular.module("app",["ngRoute","ngSanitize"]);app.config(["$routeProvider","$locationProvider",function(t,e){e.html5Mode(!0),t.when("/",{templateUrl:myLocalized.partials+"main.html",controller:"Main"}).when("/demo",{templateUrl:myLocalized.partials+"demo.html",controller:"Main"}).when("/:ID",{templateUrl:myLocalized.partials+"content.html",controller:"Content"})}]),app.controller("Main",["$scope","$http",function(t,e){e.get("wp-json/posts/").success(function(e){t.posts=e})}]),app.controller("Content",["$scope","$http","$routeParams",function(t,e,o){e.get("wp-json/posts/"+o.ID).success(function(e){t.post=e})}]),app.directive("searchForm",function(){return{restrict:"EA",template:'Search Keyword: <input type="text" name="s" ng-model="filter.s" ng-change="search()">',controller:["$scope","$http",function(t,e){t.filter={s:""},t.search=function(){e.get("wp-json/posts/?filter[s]="+t.filter.s).success(function(e){t.posts=e})}}]}}); | |
//# sourceMappingURL=./scripts.min.js.map |
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
["James", "Bond", function(James, Bond){}]; |
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
["James","Bond",function(e,t){}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For more information, please refer to my post: Minification Errors In My AngularJS WordPress Theme.