angularjs-templates

how to add different head two tags or different head information for my two directive

℡╲_俬逩灬. 提交于 2019-12-25 01:33:10
问题 I have main.cshtml file It has a head tag which includes css and js references. I have two directives / templates. I want to have different two title. When page1 opened (has template1) I want page's title to be Page-1. When page2 opened (has template2) I want page's title to be Page-2. I tried to put head tags to directive but it doesn't read title and icon-for-title. <div style="height: 100%"> <head> <title>{{::title}}</title>}} <link rel="shortcut icon" href="../../../../icons/icon1.ico"> <

Getting value of ng-change field in my angularjs controller

霸气de小男生 提交于 2019-12-11 02:24:22
问题 I have this line in my view: <input placeholder="Search" type="text" ng-change="searchChange()" ng-model="mySearch" ng-model-options="{debounce: 1000}"> And then inside my controller I have: angular.module('app.controllers', []) .controller('listViewCtrl', ['$scope', '$stateParams', '$http', function ($scope, $stateParams, $http) { $http.get('http://www.domain.co.uk/api/search.php'). then(function(response) { $scope.food = response.data; }); $scope.searchChange = function() { console.log(

Inline `ng-template` not found by `ng-include`

蹲街弑〆低调 提交于 2019-12-07 03:52:00
问题 I have a view being loaded with an embedded text/ng-template which is not being found by a ng-include later in the file. The script block sits at the very top of the view file: <script type="text/ng-template" id="stringCondition"> <!-- template guts --> </script> Which I am loading later in the file with: <ng-include src="'stringCondition'"></ng-include> But is producing a 404 error in the console: GET http://localhost/~me/stringCondition 404 (Not Found) I've tried several variants on naming

Inline `ng-template` not found by `ng-include`

孤者浪人 提交于 2019-12-05 06:34:16
I have a view being loaded with an embedded text/ng-template which is not being found by a ng-include later in the file. The script block sits at the very top of the view file: <script type="text/ng-template" id="stringCondition"> <!-- template guts --> </script> Which I am loading later in the file with: <ng-include src="'stringCondition'"></ng-include> But is producing a 404 error in the console: GET http://localhost/~me/stringCondition 404 (Not Found) I've tried several variants on naming (like having .html on the end) and using ng-include as an attribute instead of the high level element.

angular-rails-templates: templates are not found

巧了我就是萌 提交于 2019-12-01 00:47:24
I have a rails application, using angularjs for the client side development. I try to load a template located in `app/assets/javascripts/templates/': myApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', { templateUrl: '/index.html', controller: 'MainController' }). otherwise({ redirectTo: '/' }); }]); but I always get a error: "Error: [$compile:tpload] Failed to load template: /index.html". I tried to move the "templates" folder out of the javascripts - app/assets/templates and to add it to my assets pipeline load by adding the following line to config

angular-rails-templates: templates are not found

一个人想着一个人 提交于 2019-11-30 19:24:51
问题 I have a rails application, using angularjs for the client side development. I try to load a template located in `app/assets/javascripts/templates/': myApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', { templateUrl: '/index.html', controller: 'MainController' }). otherwise({ redirectTo: '/' }); }]); but I always get a error: "Error: [$compile:tpload] Failed to load template: /index.html". I tried to move the "templates" folder out of the javascripts - app