I am using Laravel framework..
I can't able to use {{
symbol inside (As laravel consider's its as outputing )
I tried this code use interpolateProvider.. ie., to use <%
instead of {{
in angularjs
in single angualr js file. but how can i do this in my .run function or config file ?
var sampleApp = angular.module('sampleApp', [], function($interpolateProvider) {
$interpolateProvider.startSymbol('<%');
$interpolateProvider.endSymbol('%>');
});
Here is my app.js
var app = angular.module('myApp', ['ngRoute', 'ngAnimate', 'toaster']);
app.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/login', {
title: 'Login',
templateUrl: 'resources/views/layout/login.php',
controller: 'authCtrl'
})
.when('/', {
title: 'Login',
templateUrl: 'resources/views/layout/login-ang.php',
controller: 'authCtrl',
role: '0'
})
.when('/invalidtoken', {
title: 'Login',
templateUrl: 'resources/views/layout/invalidtoken.php',
controller: 'authCtrl',
role: '0'
})
}
])
.run(function($rootScope, $location, Data, $http) {
$rootScope.$on("$routeChangeStart", function(event, next, current) {
$http.post('resources/views/layout/calls/checkSession.php', {}).then(function(results) {
function($rootScope, $location) {
$rootScope.this_route = function() {
return $location.path().replace('/', '');
};
};
});
});
});